Hi Ray,
We should probably add that. Although I always thought those techniques were dangerous and flawed. It assumes things were working correctly in the first place.
If you have separate inputs to KFLOP for your + and - Limits then you can configure the limits to "Disallow drive into limit". In this case after you hit a limit and everything goes disabled, you will then be able to re-enable while still in the limit and the axis will remain enabled unless you command motion in the direction that would drive you into the limit. But that doesn't help in your one switch situation.
You could add a screen button to temporarily disable limits. The button would send a notification to KFLOP to disable them. Then a watchdog loop could automatically re-enable them as soon as the limit cleared.
Or I suppose that Mach3 scheme could be implemented with a clever User program.
Group: DynoMotion |
Message: 2257 |
From: himykabibble |
Date: 11/15/2011 |
Subject: Re: Recovering From Limit Hit |
Tom,
"Or I suppose that Mach3 scheme could be implemented with a clever User program." - what I'm trying to do right now....
I do think it would be a good option to add, and I think the risk is very small. The machine will always E-Stop when the limit is first hit, and the user can assess why it happened, and whether it's wise to re-enable. And, even with Mach3, you have the option of using separate switches and making it as "safe" as you wish.
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Ray,
> Â
> We should probably add that. Although I always thought those techniques were dangerous and flawed. It assumes things were working correctly in the first place.
> Â
> If you have separate inputs to KFLOP for your + and - Limits then you can configure the limits to "Disallow drive into limit". In this case after you hit a limit and everything goes disabled, you will then be able to re-enable while still in the limit and the axis will remain enabled unless you command motion in the direction that would drive you into the limit. But that doesn't help in your one switch situation.
> Â
> You could add a screen button to temporarily disable limits.  The button would send a notification to KFLOP to disable them. Then a watchdog loop could automatically re-enable them as soon as the limit cleared.Â
> Â
> Or I suppose that Mach3 scheme could be implemented with a clever User program.
> Â
> Regards
> TK
>
>
> From: himykabibble <jagboy@...>
> To: DynoMotion@yahoogroups.com
> Sent: Tuesday, November 15, 2011 4:27 PM
> Subject: [DynoMotion] Re: Recovering From Limit Hit
>
>
> Â
> Well, that's more than a little disappointing.... I think the way Mach3 handles it is much smarter - when a limit is hit, Mach3 shuts down all axes (actually E-Stops), and remembers what direction each axis WAS moving, then disallows any further programmed moves until the limit is cleared. Jogging, however, IS enabled, PROVIDED the requested jog motion is the direction the that triggered the limit. No over-ride switch needed, and I REALLY don't want to have to add more hardware.
>
> This also helps allow a single set of switches to be used for both Home and Limit functions, which is especially nice on smaller machines, where space is limited. My machine has a single input, which serves as Home and Limit for all four axes, and it works perfectly under Mach3 (well, until now....).
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, william Carrothers <wcarrothers@> wrote:
> >
> > I've built an override switch into all my machines for this use.ÃÂ I call it the becarefull button.ÃÂ Since you have to be carefull to trigger your machine in the right direction when you used it..
> > ÃÂ
> > Actually my one control has both an open and close switch for this seeing one machine uses open limit switches and the other it connects has normally closed (the more proper way) switch setup.
> > ÃÂ
> > Put in a manual switch is what I would recomend for this..ÃÂ Only other way would be to disable the drive and move it off manually.ÃÂ But you in theory would loose your possition depending on the type of drives you have.
> > ÃÂ
> > That is one thing I'm really starting to like about my AC analog servo drives.ÃÂ they always update possition info weather they are enabled or not, moved manually or what.ÃÂ Thus when I re-enable in mach the actuall possition is updated and I go on.ÃÂ Really COOL!!!ÃÂ don't have to re-home the machine as much.
> > ÃÂ
> > b.
> > ÃÂ
> > ÃÂ
> > b.
> > ÃÂ
> >
> > --- On Tue, 11/15/11, himykabibble <jagboy@> wrote:
> >
> >
> > From: himykabibble <jagboy@>
> > Subject: [DynoMotion] Recovering From Limit Hit
> > To: DynoMotion@yahoogroups.com
> > Date: Tuesday, November 15, 2011, 7:07 PM
> >
> >
> >
> > ÃÂ
> >
> >
> >
> > Am I correct in thinking the only way to move the machine off a limit is by having a hardware limit over-ride? When I hit a limit, Mach3 goes into E-Stop, KMotion disables the axis, and there appears to be no way to even get Mach3 out of E-Stop, in order to back off the limit, without first making the limit condition go away. How do I get around this, without additional hardware?
> >
> > Regards,
> > Ray L.
> >
>
|
|
Group: DynoMotion |
Message: 2260 |
From: himykabibble |
Date: 11/15/2011 |
Subject: Re: Recovering From Limit Hit |
Tom,
How do I determine what direction an axis is moving?
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@...> wrote:
>
> Tom,
>
> "Or I suppose that Mach3 scheme could be implemented with a clever User program." - what I'm trying to do right now....
>
> I do think it would be a good option to add, and I think the risk is very small. The machine will always E-Stop when the limit is first hit, and the user can assess why it happened, and whether it's wise to re-enable. And, even with Mach3, you have the option of using separate switches and making it as "safe" as you wish.
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Ray,
> > Â
> > We should probably add that. Although I always thought those techniques were dangerous and flawed. It assumes things were working correctly in the first place.
> > Â
> > If you have separate inputs to KFLOP for your + and - Limits then you can configure the limits to "Disallow drive into limit". In this case after you hit a limit and everything goes disabled, you will then be able to re-enable while still in the limit and the axis will remain enabled unless you command motion in the direction that would drive you into the limit. But that doesn't help in your one switch situation.
> > Â
> > You could add a screen button to temporarily disable limits.  The button would send a notification to KFLOP to disable them. Then a watchdog loop could automatically re-enable them as soon as the limit cleared.Â
> > Â
> > Or I suppose that Mach3 scheme could be implemented with a clever User program.
> > Â
> > Regards
> > TK
> >
> >
> > From: himykabibble <jagboy@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Tuesday, November 15, 2011 4:27 PM
> > Subject: [DynoMotion] Re: Recovering From Limit Hit
> >
> >
> > Â
> > Well, that's more than a little disappointing.... I think the way Mach3 handles it is much smarter - when a limit is hit, Mach3 shuts down all axes (actually E-Stops), and remembers what direction each axis WAS moving, then disallows any further programmed moves until the limit is cleared. Jogging, however, IS enabled, PROVIDED the requested jog motion is the direction the that triggered the limit. No over-ride switch needed, and I REALLY don't want to have to add more hardware.
> >
> > This also helps allow a single set of switches to be used for both Home and Limit functions, which is especially nice on smaller machines, where space is limited. My machine has a single input, which serves as Home and Limit for all four axes, and it works perfectly under Mach3 (well, until now....).
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com, william Carrothers <wcarrothers@> wrote:
> > >
> > > I've built an override switch into all my machines for this use.ÃÂ I call it the becarefull button.ÃÂ Since you have to be carefull to trigger your machine in the right direction when you used it..
> > > ÃÂ
> > > Actually my one control has both an open and close switch for this seeing one machine uses open limit switches and the other it connects has normally closed (the more proper way) switch setup.
> > > ÃÂ
> > > Put in a manual switch is what I would recomend for this..ÃÂ Only other way would be to disable the drive and move it off manually.ÃÂ But you in theory would loose your possition depending on the type of drives you have.
> > > ÃÂ
> > > That is one thing I'm really starting to like about my AC analog servo drives.ÃÂ they always update possition info weather they are enabled or not, moved manually or what.ÃÂ Thus when I re-enable in mach the actuall possition is updated and I go on.ÃÂ Really COOL!!!ÃÂ don't have to re-home the machine as much.
> > > ÃÂ
> > > b.
> > > ÃÂ
> > > ÃÂ
> > > b.
> > > ÃÂ
> > >
> > > --- On Tue, 11/15/11, himykabibble <jagboy@> wrote:
> > >
> > >
> > > From: himykabibble <jagboy@>
> > > Subject: [DynoMotion] Recovering From Limit Hit
> > > To: DynoMotion@yahoogroups.com
> > > Date: Tuesday, November 15, 2011, 7:07 PM
> > >
> > >
> > >
> > > ÃÂ
> > >
> > >
> > >
> > > Am I correct in thinking the only way to move the machine off a limit is by having a hardware limit over-ride? When I hit a limit, Mach3 goes into E-Stop, KMotion disables the axis, and there appears to be no way to even get Mach3 out of E-Stop, in order to back off the limit, without first making the limit condition go away. How do I get around this, without additional hardware?
> > >
> > > Regards,
> > > Ray L.
> > >
> >
>
|
|
Group: DynoMotion |
Message: 2262 |
From: Tom Kerekes |
Date: 11/15/2011 |
Subject: Re: Recovering From Limit Hit |
Ray,
ch->Dest - ch->last_dest
Should tell you.
TK
Group: DynoMotion |
Message: 2264 |
From: Wcarrothers |
Date: 11/15/2011 |
Subject: Re: Recovering From Limit Hit |
Guess I've been doing it wrong for the last 4+ years..
But seems to me, if you have your limit switches setup as normally closed, once the machine is sitting on one. Putting a normally open push button overuse switch ahead of all those to disable it then reset Mach and jog off seems to me the easy way to do it.
Bump a limit, press and hold your override, reset Mach, jog off and continue.
I also have my limits wired to disable my drives and apply my servo motors parking brakes to so it does not coast into a collision with it self. So I sorta need away to re enable the drives, release the breaks at the same time.
B.
B. On Nov 15, 2011, at 8:25 PM, "himykabibble" <jagboy@...> wrote:
Tom,
"Or I suppose that Mach3 scheme could be implemented with a clever User program." - what I'm trying to do right now....
I do think it would be a good option to add, and I think the risk is very small. The machine will always E-Stop when the limit is first hit, and the user can assess why it happened, and whether it's wise to re-enable. And, even with Mach3, you have the option of using separate switches and making it as "safe" as you wish.
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Ray,
> Â
> We should probably add that. Although I always thought those techniques were dangerous and flawed. It assumes things were working correctly in the first place.
> Â
> If you have separate inputs to KFLOP for your + and - Limits then you can configure the limits to "Disallow drive into limit". In this case after you hit a limit and everything goes disabled, you will then be able to re-enable while still in the limit and the axis will remain enabled unless you command motion in the direction that would drive you into the limit. But that doesn't help in your one switch situation.
> Â
> You could add a screen button to temporarily disable limits.  The button would send a notification to KFLOP to disable them. Then a watchdog loop could automatically re-enable them as soon as the limit cleared.Â
> Â
> Or I suppose that Mach3 scheme could be implemented with a clever User program.
> Â
> Regards
> TK
>
>
> From: himykabibble <jagboy@...>
> To: DynoMotion@yahoogroups.com
> Sent: Tuesday, November 15, 2011 4:27 PM
> Subject: [DynoMotion] Re: Recovering From Limit Hit
>
>
> Â
> Well, that's more than a little disappointing.... I think the way Mach3 handles it is much smarter - when a limit is hit, Mach3 shuts down all axes (actually E-Stops), and remembers what direction each axis WAS moving, then disallows any further programmed moves until the limit is cleared. Jogging, however, IS enabled, PROVIDED the requested jog motion is the direction the that triggered the limit. No over-ride switch needed, and I REALLY don't want to have to add more hardware.
>
> This also helps allow a single set of switches to be used for both Home and Limit functions, which is especially nice on smaller machines, where space is limited. My machine has a single input, which serves as Home and Limit for all four axes, and it works perfectly under Mach3 (well, until now....).
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, william Carrothers <wcarrothers@> wrote:
> >
> > I've built an override switch into all my machines for this use. I call it the becarefull button. Since you have to be carefull to trigger your machine in the right direction when you used it..
> > ÂÂ
> > Actually my one control has both an open and close switch for this seeing one machine uses open limit switches and the other it connects has normally closed (the more proper way) switch setup.
> > ÂÂ
> > Put in a manual switch is what I would recomend for this.. Only other way would be to disable the drive and move it off manually. But you in theory would loose your possition depending on the type of drives you have.
> > ÂÂ
> > That is one thing I'm really starting to like about my AC analog servo drives. they always update possition info weather they are enabled or not, moved manually or what. Thus when I re-enable in mach the actuall possition is updated and I go on. Really COOL!!! don't have to re-home the machine as much.
> > ÂÂ
> > b.
> > ÂÂ
> > ÂÂ
> > b.
> > ÂÂ
> >
> > --- On Tue, 11/15/11, himykabibble <jagboy@> wrote:
> >
> >
> > From: himykabibble <jagboy@>
> > Subject: [DynoMotion] Recovering From Limit Hit
> > To: DynoMotion@yahoogroups.com
> > Date: Tuesday, November 15, 2011, 7:07 PM
> >
> >
> >
> > ÂÂ
> >
> >
> >
> > Am I correct in thinking the only way to move the machine off a limit is by having a hardware limit over-ride? When I hit a limit, Mach3 goes into E-Stop, KMotion disables the axis, and there appears to be no way to even get Mach3 out of E-Stop, in order to back off the limit, without first making the limit condition go away. How do I get around this, without additional hardware?
> >
> > Regards,
> > Ray L.
> >
>
|
|
Group: DynoMotion |
Message: 2265 |
From: himykabibble |
Date: 11/15/2011 |
Subject: Re: Recovering From Limit Hit |
Tom,
OK, I figured that out a few minutes ago, and when I hit the limit, I do a StopCoordinatedMotion, which seems to FeedHold. But as soon as I release the FeedHold (though the header file says it does an E-Stop), the axis moves a short distance. I tried setting Dest=last_dest, but that didn't help. How do I stop the axis, and make sure it stays stopped? I've got logic in there that will stop it again if an attempt is made to move again in the same direction before the limit is cleared.
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Ray,
> Â
> ch->Dest - ch->last_dest
> Should tell you.
> Â
> TK
> Â
> Â
> From: himykabibble <jagboy@...>
> To: DynoMotion@yahoogroups.com
> Sent: Tuesday, November 15, 2011 6:15 PM
> Subject: [DynoMotion] Re: Recovering From Limit Hit
>
>
> Â
> Tom,
>
> How do I determine what direction an axis is moving?
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> >
> > Tom,
> >
> > "Or I suppose that Mach3 scheme could be implemented with a clever User program." - what I'm trying to do right now....
> >
> > I do think it would be a good option to add, and I think the risk is very small. The machine will always E-Stop when the limit is first hit, and the user can assess why it happened, and whether it's wise to re-enable. And, even with Mach3, you have the option of using separate switches and making it as "safe" as you wish.
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Ray,
> > > ÃÂ
> > > We should probably add that.ÃÂ Although I always thought those techniques were dangerous and flawed.ÃÂ It assumes things were working correctly in the first place.
> > > ÃÂ
> > > If you have separate inputs to KFLOP for your + and - Limits then you can configure the limits to "Disallow drive into limit". In this case after you hit a limit and everything goes disabled, you will then be able to re-enable while still in the limit and the axis will remain enabled unless you command motion in the direction that would drive you into the limit.ÃÂ But that doesn't help in your one switch situation.
> > > ÃÂ
> > > You could add a screen button to temporarily disable limits.ÃÂ ÃÂ The button would send a notification to KFLOP to disable them.ÃÂ Then a watchdog loop could automatically re-enable them as soon as the limit cleared.ÃÂ
> > > ÃÂ
> > > Or I suppose that Mach3 scheme could be implemented with a clever User program.
> > > ÃÂ
> > > Regards
> > > TK
> > >
> > >
> > > From: himykabibble <jagboy@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Tuesday, November 15, 2011 4:27 PM
> > > Subject: [DynoMotion] Re: Recovering From Limit Hit
> > >
> > >
> > > ÃÂ
> > > Well, that's more than a little disappointing.... I think the way Mach3 handles it is much smarter - when a limit is hit, Mach3 shuts down all axes (actually E-Stops), and remembers what direction each axis WAS moving, then disallows any further programmed moves until the limit is cleared. Jogging, however, IS enabled, PROVIDED the requested jog motion is the direction the that triggered the limit. No over-ride switch needed, and I REALLY don't want to have to add more hardware.
> > >
> > > This also helps allow a single set of switches to be used for both Home and Limit functions, which is especially nice on smaller machines, where space is limited. My machine has a single input, which serves as Home and Limit for all four axes, and it works perfectly under Mach3 (well, until now....).
> > >
> > > Regards,
> > > Ray L.
> > >
> > > --- In DynoMotion@yahoogroups.com, william Carrothers <wcarrothers@> wrote:
> > > >
> > > > I've built an override switch into all my machines for this use.ÃâàI call it the becarefull button.ÃâàSince you have to be carefull to trigger your machine in the right direction when you used it..
> > > > ÃâÃÂ
> > > > Actually my one control has both an open and close switch for this seeing one machine uses open limit switches and the other it connects has normally closed (the more proper way) switch setup.
> > > > ÃâÃÂ
> > > > Put in a manual switch is what I would recomend for this..ÃâàOnly other way would be to disable the drive and move it off manually.ÃâàBut you in theory would loose your possition depending on the type of drives you have.
> > > > ÃâÃÂ
> > > > That is one thing I'm really starting to like about my AC analog servo drives.Ãâàthey always update possition info weather they are enabled or not, moved manually or what.ÃâàThus when I re-enable in mach the actuall possition is updated and I go on.ÃâàReally COOL!!!Ãâàdon't have to re-home the machine as much.
> > > > ÃâÃÂ
> > > > b.
> > > > ÃâÃÂ
> > > > ÃâÃÂ
> > > > b.
> > > > ÃâÃÂ
> > > >
> > > > --- On Tue, 11/15/11, himykabibble <jagboy@> wrote:
> > > >
> > > >
> > > > From: himykabibble <jagboy@>
> > > > Subject: [DynoMotion] Recovering From Limit Hit
> > > > To: DynoMotion@yahoogroups.com
> > > > Date: Tuesday, November 15, 2011, 7:07 PM
> > > >
> > > >
> > > >
> > > > ÃâÃÂ
> > > >
> > > >
> > > >
> > > > Am I correct in thinking the only way to move the machine off a limit is by having a hardware limit over-ride? When I hit a limit, Mach3 goes into E-Stop, KMotion disables the axis, and there appears to be no way to even get Mach3 out of E-Stop, in order to back off the limit, without first making the limit condition go away. How do I get around this, without additional hardware?
> > > >
> > > > Regards,
> > > > Ray L.
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 2266 |
From: Tom Kerekes |
Date: 11/15/2011 |
Subject: Re: Recovering From Limit Hit |
Hi Ray,
Not sure what you mean by "release".
But I think we may need to disable the axis otherwise Gcode or Jogging or MPG could still keep driving.
After a feedhold loop calling:
void UpdateStoppingState(void); // Update Stopping Status (only required for indep stopping)
and checking
extern int CS0_StoppingState; // emergency stop in progress, 0 = not stopping, 1=stopping coord motion, 2=stopping indep, 3=fully stopped, 4=ind stopped
will tell is when we are stopped. Then disable all the axes.
There is a command to clear the Feedhold and remain stationary. But that won't prevent new commandsto move.
void ClearStopImmediately(void); // Clear Stop Condition without resuming
TK
Group: DynoMotion |
Message: 2267 |
From: himykabibble |
Date: 11/15/2011 |
Subject: Re: Recovering From Limit Hit |
Tom,
Seems to me, the logic needs to be:
1) If limit hit is detected, first, make a note of which axes were moving, and in which directions.
2) Immediately stop ALL motion, stop the spindle, coolant off, etc. Do it quickly, but gracefully.
3) Once stopped, and until the limit is cleared, we need to block ALL coordinated moves, and allow ONLY jogs on any of the axes that WERE moving when the limit was hit, AND only in the direction opposite their last motion.
I've got the detection, and capturing of move direction working. But stopping is the first problem. StopCoordinatedMotion does not stop anything if the axis is being jogged. The only thing I've found that works is to disable the axis, which is a mighty big hammer to use for such a small nail. And I'd be concerned that doing this while trying to use a single set of switches for both Home and Limit could cause position loss, unless the axes are moving very slowly.
I have no idea how to block only specific kinds of moves, other than by re-enabling all axes, and then re-stopping them (as above) if a move is attempted further into the limits. That seems really crude. Is there a cleaner way?
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Ray,
> Â
> Not sure what you mean by "release".
> Â
> But I think we may need to disable the axis otherwise Gcode or Jogging or MPG could still keep driving.
> Â
> After a feedhold loop calling:
> Â void
> Â
> and checkingUpdateStoppingState(void); // Update Stopping Status (only required for indep stopping)
> Â extern
> Â
> will tell is when we are stopped. Then disable all the axes.
> Â
> There is a command to clear the Feedhold and remain stationary. But that won't prevent new commandsto move.Â
> Â void
> Â
> TKClearStopImmediately(void); // Clear Stop Condition without resumingintCS0_StoppingState; // emergency stop in progress, 0 = not stopping, 1=stopping coord motion, 2=stopping indep, 3=fully stopped, 4=ind stopped
>
> From: himykabibble <jagboy@...>
> To: DynoMotion@yahoogroups.com
> Sent: Tuesday, November 15, 2011 7:08 PM
> Subject: [DynoMotion] Re: Recovering From Limit Hit
>
>
> Â
> Tom,
>
> OK, I figured that out a few minutes ago, and when I hit the limit, I do a StopCoordinatedMotion, which seems to FeedHold. But as soon as I release the FeedHold (though the header file says it does an E-Stop), the axis moves a short distance. I tried setting Dest=last_dest, but that didn't help. How do I stop the axis, and make sure it stays stopped? I've got logic in there that will stop it again if an attempt is made to move again in the same direction before the limit is cleared.
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Ray,
> > ÃÂ
> > ch->Dest - ch->last_dest
> > Should tell you.
> > ÃÂ
> > TK
> > ÃÂ
> > ÃÂ
> > From: himykabibble <jagboy@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Tuesday, November 15, 2011 6:15 PM
> > Subject: [DynoMotion] Re: Recovering From Limit Hit
> >
> >
> > ÃÂ
> > Tom,
> >
> > How do I determine what direction an axis is moving?
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > >
> > > Tom,
> > >
> > > "Or I suppose that Mach3 scheme could be implemented with a clever User program." - what I'm trying to do right now....
> > >
> > > I do think it would be a good option to add, and I think the risk is very small. The machine will always E-Stop when the limit is first hit, and the user can assess why it happened, and whether it's wise to re-enable. And, even with Mach3, you have the option of using separate switches and making it as "safe" as you wish.
> > >
> > > Regards,
> > > Ray L.
> > >
> > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > >
> > > > Hi Ray,
> > > > ÃâÃÂ
> > > > We should probably add that.ÃâàAlthough I always thought those techniques were dangerous and flawed.ÃâàIt assumes things were working correctly in the first place.
> > > > ÃâÃÂ
> > > > If you have separate inputs to KFLOP for your + and - Limits then you can configure the limits to "Disallow drive into limit". In this case after you hit a limit and everything goes disabled, you will then be able to re-enable while still in the limit and the axis will remain enabled unless you command motion in the direction that would drive you into the limit.ÃâàBut that doesn't help in your one switch situation.
> > > > ÃâÃÂ
> > > > You could add a screen button to temporarily disable limits.ÃâàÃâàThe button would send a notification to KFLOP to disable them.ÃâàThen a watchdog loop could automatically re-enable them as soon as the limit cleared.ÃâÃÂ
> > > > ÃâÃÂ
> > > > Or I suppose that Mach3 scheme could be implemented with a clever User program.
> > > > ÃâÃÂ
> > > > Regards
> > > > TK
> > > >
> > > >
> > > > From: himykabibble <jagboy@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Tuesday, November 15, 2011 4:27 PM
> > > > Subject: [DynoMotion] Re: Recovering From Limit Hit
> > > >
> > > >
> > > > ÃâÃÂ
> > > > Well, that's more than a little disappointing.... I think the way Mach3 handles it is much smarter - when a limit is hit, Mach3 shuts down all axes (actually E-Stops), and remembers what direction each axis WAS moving, then disallows any further programmed moves until the limit is cleared. Jogging, however, IS enabled, PROVIDED the requested jog motion is the direction the that triggered the limit. No over-ride switch needed, and I REALLY don't want to have to add more hardware.
> > > >
> > > > This also helps allow a single set of switches to be used for both Home and Limit functions, which is especially nice on smaller machines, where space is limited. My machine has a single input, which serves as Home and Limit for all four axes, and it works perfectly under Mach3 (well, until now....).
> > > >
> > > > Regards,
> > > > Ray L.
> > > >
> > > > --- In DynoMotion@yahoogroups.com, william Carrothers <wcarrothers@> wrote:
> > > > >
> > > > > I've built an override switch into all my machines for this use.ÃÆ'ââ¬Å¡ÃâàI call it the becarefull button.ÃÆ'ââ¬Å¡ÃâàSince you have to be carefull to trigger your machine in the right direction when you used it..
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > Actually my one control has both an open and close switch for this seeing one machine uses open limit switches and the other it connects has normally closed (the more proper way) switch setup.
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > Put in a manual switch is what I would recomend for this..ÃÆ'ââ¬Å¡ÃâàOnly other way would be to disable the drive and move it off manually.ÃÆ'ââ¬Å¡ÃâàBut you in theory would loose your possition depending on the type of drives you have.
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > That is one thing I'm really starting to like about my AC analog servo drives.ÃÆ'ââ¬Å¡Ãâàthey always update possition info weather they are enabled or not, moved manually or what.ÃÆ'ââ¬Å¡ÃâàThus when I re-enable in mach the actuall possition is updated and I go on.ÃÆ'ââ¬Å¡ÃâàReally COOL!!!ÃÆ'ââ¬Å¡Ãâàdon't have to re-home the machine as much.
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > b.
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > b.
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > >
> > > > > --- On Tue, 11/15/11, himykabibble <jagboy@> wrote:
> > > > >
> > > > >
> > > > > From: himykabibble <jagboy@>
> > > > > Subject: [DynoMotion] Recovering From Limit Hit
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Date: Tuesday, November 15, 2011, 7:07 PM
> > > > >
> > > > >
> > > > >
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > >
> > > > >
> > > > >
> > > > > Am I correct in thinking the only way to move the machine off a limit is by having a hardware limit over-ride? When I hit a limit, Mach3 goes into E-Stop, KMotion disables the axis, and there appears to be no way to even get Mach3 out of E-Stop, in order to back off the limit, without first making the limit condition go away. How do I get around this, without additional hardware?
> > > > >
> > > > > Regards,
> > > > > Ray L.
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 2271 |
From: himykabibble |
Date: 11/16/2011 |
Subject: Re: Recovering From Limit Hit |
I've implemented a kludgey work-around, but I'd really like to get this working better. For now, I've done a Home routine that over-rides the limits. So, at least in Mach3, if I run into the + limit, I can do a home to back off. If I run into the - limit, I'll have a small problem. For KMotionCNC, I've created a user button that over-rides the limits for 2 seconds, so I have time to jog off.
I've tried to write a user program to do all the limit handling, but there are several things I can't seem to get to work right. First, I can't get the axis to stop immediately, if it's being jogged (by holding down a jog key), without disabling it, which seems really brute-force to me. I'd like to stop it gracefully, so there's no position loss. Once stopped, I can't figure out how to allow only jogging away from the limit, until the limit is cleared.
BTW - on my machine, it would be a LOT of work to even separate the + and - limits, as I use proximity sensors, which ride over a steel rail, and trip when they move past the end of the rail. So, there is only ONE sensor per axis, with no way to separate out + from -.
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@...> wrote:
>
> Tom,
>
> Seems to me, the logic needs to be:
>
> 1) If limit hit is detected, first, make a note of which axes were moving, and in which directions.
> 2) Immediately stop ALL motion, stop the spindle, coolant off, etc. Do it quickly, but gracefully.
> 3) Once stopped, and until the limit is cleared, we need to block ALL coordinated moves, and allow ONLY jogs on any of the axes that WERE moving when the limit was hit, AND only in the direction opposite their last motion.
>
> I've got the detection, and capturing of move direction working. But stopping is the first problem. StopCoordinatedMotion does not stop anything if the axis is being jogged. The only thing I've found that works is to disable the axis, which is a mighty big hammer to use for such a small nail. And I'd be concerned that doing this while trying to use a single set of switches for both Home and Limit could cause position loss, unless the axes are moving very slowly.
>
> I have no idea how to block only specific kinds of moves, other than by re-enabling all axes, and then re-stopping them (as above) if a move is attempted further into the limits. That seems really crude. Is there a cleaner way?
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Ray,
> > Â
> > Not sure what you mean by "release".
> > Â
> > But I think we may need to disable the axis otherwise Gcode or Jogging or MPG could still keep driving.
> > Â
> > After a feedhold loop calling:
> > Â void
> > Â
> > and checkingUpdateStoppingState(void); // Update Stopping Status (only required for indep stopping)
> > Â extern
> > Â
> > will tell is when we are stopped. Then disable all the axes.
> > Â
> > There is a command to clear the Feedhold and remain stationary. But that won't prevent new commandsto move.Â
> > Â void
> > Â
> > TKClearStopImmediately(void); // Clear Stop Condition without resumingintCS0_StoppingState; // emergency stop in progress, 0 = not stopping, 1=stopping coord motion, 2=stopping indep, 3=fully stopped, 4=ind stopped
> >
> > From: himykabibble <jagboy@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Tuesday, November 15, 2011 7:08 PM
> > Subject: [DynoMotion] Re: Recovering From Limit Hit
> >
> >
> > Â
> > Tom,
> >
> > OK, I figured that out a few minutes ago, and when I hit the limit, I do a StopCoordinatedMotion, which seems to FeedHold. But as soon as I release the FeedHold (though the header file says it does an E-Stop), the axis moves a short distance. I tried setting Dest=last_dest, but that didn't help. How do I stop the axis, and make sure it stays stopped? I've got logic in there that will stop it again if an attempt is made to move again in the same direction before the limit is cleared.
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Ray,
> > > ÃÂ
> > > ch->Dest - ch->last_dest
> > > Should tell you.
> > > ÃÂ
> > > TK
> > > ÃÂ
> > > ÃÂ
> > > From: himykabibble <jagboy@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Tuesday, November 15, 2011 6:15 PM
> > > Subject: [DynoMotion] Re: Recovering From Limit Hit
> > >
> > >
> > > ÃÂ
> > > Tom,
> > >
> > > How do I determine what direction an axis is moving?
> > >
> > > Regards,
> > > Ray L.
> > >
> > > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > >
> > > > Tom,
> > > >
> > > > "Or I suppose that Mach3 scheme could be implemented with a clever User program." - what I'm trying to do right now....
> > > >
> > > > I do think it would be a good option to add, and I think the risk is very small. The machine will always E-Stop when the limit is first hit, and the user can assess why it happened, and whether it's wise to re-enable. And, even with Mach3, you have the option of using separate switches and making it as "safe" as you wish.
> > > >
> > > > Regards,
> > > > Ray L.
> > > >
> > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > >
> > > > > Hi Ray,
> > > > > ÃâÃÂ
> > > > > We should probably add that.ÃâàAlthough I always thought those techniques were dangerous and flawed.ÃâàIt assumes things were working correctly in the first place.
> > > > > ÃâÃÂ
> > > > > If you have separate inputs to KFLOP for your + and - Limits then you can configure the limits to "Disallow drive into limit". In this case after you hit a limit and everything goes disabled, you will then be able to re-enable while still in the limit and the axis will remain enabled unless you command motion in the direction that would drive you into the limit.ÃâàBut that doesn't help in your one switch situation.
> > > > > ÃâÃÂ
> > > > > You could add a screen button to temporarily disable limits.ÃâàÃâàThe button would send a notification to KFLOP to disable them.ÃâàThen a watchdog loop could automatically re-enable them as soon as the limit cleared.ÃâÃÂ
> > > > > ÃâÃÂ
> > > > > Or I suppose that Mach3 scheme could be implemented with a clever User program.
> > > > > ÃâÃÂ
> > > > > Regards
> > > > > TK
> > > > >
> > > > >
> > > > > From: himykabibble <jagboy@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Tuesday, November 15, 2011 4:27 PM
> > > > > Subject: [DynoMotion] Re: Recovering From Limit Hit
> > > > >
> > > > >
> > > > > ÃâÃÂ
> > > > > Well, that's more than a little disappointing.... I think the way Mach3 handles it is much smarter - when a limit is hit, Mach3 shuts down all axes (actually E-Stops), and remembers what direction each axis WAS moving, then disallows any further programmed moves until the limit is cleared. Jogging, however, IS enabled, PROVIDED the requested jog motion is the direction the that triggered the limit. No over-ride switch needed, and I REALLY don't want to have to add more hardware.
> > > > >
> > > > > This also helps allow a single set of switches to be used for both Home and Limit functions, which is especially nice on smaller machines, where space is limited. My machine has a single input, which serves as Home and Limit for all four axes, and it works perfectly under Mach3 (well, until now....).
> > > > >
> > > > > Regards,
> > > > > Ray L.
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, william Carrothers <wcarrothers@> wrote:
> > > > > >
> > > > > > I've built an override switch into all my machines for this use.ÃÆ'ââ¬Å¡ÃâàI call it the becarefull button.ÃÆ'ââ¬Å¡ÃâàSince you have to be carefull to trigger your machine in the right direction when you used it..
> > > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > Actually my one control has both an open and close switch for this seeing one machine uses open limit switches and the other it connects has normally closed (the more proper way) switch setup.
> > > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > Put in a manual switch is what I would recomend for this..ÃÆ'ââ¬Å¡ÃâàOnly other way would be to disable the drive and move it off manually.ÃÆ'ââ¬Å¡ÃâàBut you in theory would loose your possition depending on the type of drives you have.
> > > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > That is one thing I'm really starting to like about my AC analog servo drives.ÃÆ'ââ¬Å¡Ãâàthey always update possition info weather they are enabled or not, moved manually or what.ÃÆ'ââ¬Å¡ÃâàThus when I re-enable in mach the actuall possition is updated and I go on.ÃÆ'ââ¬Å¡ÃâàReally COOL!!!ÃÆ'ââ¬Å¡Ãâàdon't have to re-home the machine as much.
> > > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > b.
> > > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > b.
> > > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > >
> > > > > > --- On Tue, 11/15/11, himykabibble <jagboy@> wrote:
> > > > > >
> > > > > >
> > > > > > From: himykabibble <jagboy@>
> > > > > > Subject: [DynoMotion] Recovering From Limit Hit
> > > > > > To: DynoMotion@yahoogroups.com
> > > > > > Date: Tuesday, November 15, 2011, 7:07 PM
> > > > > >
> > > > > >
> > > > > >
> > > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > >
> > > > > >
> > > > > >
> > > > > > Am I correct in thinking the only way to move the machine off a limit is by having a hardware limit over-ride? When I hit a limit, Mach3 goes into E-Stop, KMotion disables the axis, and there appears to be no way to even get Mach3 out of E-Stop, in order to back off the limit, without first making the limit condition go away. How do I get around this, without additional hardware?
> > > > > >
> > > > > > Regards,
> > > > > > Ray L.
> > > > > >
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 2273 |
From: Tom Kerekes |
Date: 11/16/2011 |
Subject: Re: Recovering From Limit Hit |
Hi Ray,
If it was easy we would have already done it :}
I looked into the Feedhold while jogging scenario. The Feedhold does do a stop (Jog=0) so the axis will start decelerating to a stop, but then any subsequent motion commands will just cause it to accelerate again. I can't think of a solution without putting in a number of "blocking" mechanisms or somehow informing Mach3 and/or the plugin to stop jogging. Maybe a global "Fault" flag or something? I think this is an important issue but just don't know what is the best solution.
Regarding only allowing drive in one direction: I think if you re-configure the limit options to only watch limits on one end and also set the mode to "Disable drive into limit" it might do what you need.
Another workaround you might consider is to have a User program create virtual limit switches. Using the single limit switch and other information like axis position, direction of motion, set two virtual limit bits (IO 48-63). Then configure the axis to watch the virtual IO bits. But then maybe this boils down to the same thing.
Regards
TK
Group: DynoMotion |
Message: 2276 |
From: himykabibble |
Date: 11/16/2011 |
Subject: Re: Recovering From Limit Hit |
Tom,
Two very good ideas I think I can easily implement. I'll give it a shot tonight. Thanks!
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Ray,
> Â
> If it was easy we would have already done it :}
> Â
> I looked into the Feedhold while jogging scenario. The Feedhold does do a stop (Jog=0) so the axis will start decelerating to a stop, but then any subsequent motion commands will just cause it to accelerate again. I can't think of a solution without putting in a number of "blocking" mechanisms or somehow informing Mach3 and/or the plugin to stop jogging. Maybe a global "Fault" flag or something? I think this is an important issue but just don't know what is the best solution.
> Â
> Regarding only allowing drive in one direction:Â I think if you re-configure the limit options to only watch limits on one end and also set the mode to "Disable drive into limit" it might do what you need.
> Â
> Another workaround you might consider is to have a User program create virtual limit switches. Using the single limit switch and other information like axis position, direction of motion, set two virtual limit bits (IO 48-63). Then configure the axis to watch the virtual IO bits. But then maybe this boils down to the same thing.
> Â
> Regards
> TK
> Â
> Â
>
>
> ________________________________
> From: himykabibble <jagboy@...>
> To: DynoMotion@yahoogroups.com
> Sent: Wednesday, November 16, 2011 8:32 AM
> Subject: [DynoMotion] Re: Recovering From Limit Hit
>
>
> Â
> I've implemented a kludgey work-around, but I'd really like to get this working better. For now, I've done a Home routine that over-rides the limits. So, at least in Mach3, if I run into the + limit, I can do a home to back off. If I run into the - limit, I'll have a small problem. For KMotionCNC, I've created a user button that over-rides the limits for 2 seconds, so I have time to jog off.
>
> I've tried to write a user program to do all the limit handling, but there are several things I can't seem to get to work right. First, I can't get the axis to stop immediately, if it's being jogged (by holding down a jog key), without disabling it, which seems really brute-force to me. I'd like to stop it gracefully, so there's no position loss. Once stopped, I can't figure out how to allow only jogging away from the limit, until the limit is cleared.
>
> BTW - on my machine, it would be a LOT of work to even separate the + and - limits, as I use proximity sensors, which ride over a steel rail, and trip when they move past the end of the rail. So, there is only ONE sensor per axis, with no way to separate out + from -.
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> >
> > Tom,
> >
> > Seems to me, the logic needs to be:
> >
> > 1) If limit hit is detected, first, make a note of which axes were moving, and in which directions.
> > 2) Immediately stop ALL motion, stop the spindle, coolant off, etc. Do it quickly, but gracefully.
> > 3) Once stopped, and until the limit is cleared, we need to block ALL coordinated moves, and allow ONLY jogs on any of the axes that WERE moving when the limit was hit, AND only in the direction opposite their last motion.
> >
> > I've got the detection, and capturing of move direction working. But stopping is the first problem. StopCoordinatedMotion does not stop anything if the axis is being jogged. The only thing I've found that works is to disable the axis, which is a mighty big hammer to use for such a small nail. And I'd be concerned that doing this while trying to use a single set of switches for both Home and Limit could cause position loss, unless the axes are moving very slowly.
> >
> > I have no idea how to block only specific kinds of moves, other than by re-enabling all axes, and then re-stopping them (as above) if a move is attempted further into the limits. That seems really crude. Is there a cleaner way?
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Ray,
> > > ÃÂ
> > > Not sure what you mean by "release".
> > > ÃÂ
> > > But I think we may need to disable the axis otherwise Gcode or Jogging or MPG could still keep driving.
> > > ÃÂ
> > > After a feedhold loop calling:
> > > ÃÂ void
> > > ÃÂ
> > > and checkingUpdateStoppingState(void); // Update Stopping Status (only required for indep stopping)
> > > ÃÂ extern
> > > ÃÂ
> > > will tell is when we are stopped.ÃÂ Then disable all the axes.
> > > ÃÂ
> > > There is a command to clear the Feedhold and remain stationary.ÃÂ But that won't prevent new commandsto move.ÃÂ
> > > ÃÂ void
> > > ÃÂ
> > > TKClearStopImmediately(void); // Clear Stop Condition without resumingintCS0_StoppingState; // emergency stop in progress, 0 = not stopping, 1=stopping coord motion, 2=stopping indep, 3=fully stopped, 4=ind stopped
> > >
> > > From: himykabibble <jagboy@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Tuesday, November 15, 2011 7:08 PM
> > > Subject: [DynoMotion] Re: Recovering From Limit Hit
> > >
> > >
> > > ÃÂ
> > > Tom,
> > >
> > > OK, I figured that out a few minutes ago, and when I hit the limit, I do a StopCoordinatedMotion, which seems to FeedHold. But as soon as I release the FeedHold (though the header file says it does an E-Stop), the axis moves a short distance. I tried setting Dest=last_dest, but that didn't help. How do I stop the axis, and make sure it stays stopped? I've got logic in there that will stop it again if an attempt is made to move again in the same direction before the limit is cleared.
> > >
> > > Regards,
> > > Ray L.
> > >
> > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > >
> > > > Ray,
> > > > ÃâÃÂ
> > > > ch->Dest - ch->last_dest
> > > > Should tell you.
> > > > ÃâÃÂ
> > > > TK
> > > > ÃâÃÂ
> > > > ÃâÃÂ
> > > > From: himykabibble <jagboy@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Tuesday, November 15, 2011 6:15 PM
> > > > Subject: [DynoMotion] Re: Recovering From Limit Hit
> > > >
> > > >
> > > > ÃâÃÂ
> > > > Tom,
> > > >
> > > > How do I determine what direction an axis is moving?
> > > >
> > > > Regards,
> > > > Ray L.
> > > >
> > > > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > > >
> > > > > Tom,
> > > > >
> > > > > "Or I suppose that Mach3 scheme could be implemented with a clever User program." - what I'm trying to do right now....
> > > > >
> > > > > I do think it would be a good option to add, and I think the risk is very small. The machine will always E-Stop when the limit is first hit, and the user can assess why it happened, and whether it's wise to re-enable. And, even with Mach3, you have the option of using separate switches and making it as "safe" as you wish.
> > > > >
> > > > > Regards,
> > > > > Ray L.
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > >
> > > > > > Hi Ray,
> > > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > We should probably add that.ÃÆ'ââ¬Å¡ÃâàAlthough I always thought those techniques were dangerous and flawed.ÃÆ'ââ¬Å¡ÃâàIt assumes things were working correctly in the first place.
> > > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > If you have separate inputs to KFLOP for your + and - Limits then you can configure the limits to "Disallow drive into limit". In this case after you hit a limit and everything goes disabled, you will then be able to re-enable while still in the limit and the axis will remain enabled unless you command motion in the direction that would drive you into the limit.ÃÆ'ââ¬Å¡ÃâàBut that doesn't help in your one switch situation.
> > > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > You could add a screen button to temporarily disable limits.ÃÆ'ââ¬Å¡ÃâàÃÆ'ââ¬Å¡ÃâàThe button would send a notification to KFLOP to disable them.ÃÆ'ââ¬Å¡ÃâàThen a watchdog loop could automatically re-enable them as soon as the limit cleared.ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > Or I suppose that Mach3 scheme could be implemented with a clever User program.
> > > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > Regards
> > > > > > TK
> > > > > >
> > > > > >
> > > > > > From: himykabibble <jagboy@>
> > > > > > To: DynoMotion@yahoogroups.com
> > > > > > Sent: Tuesday, November 15, 2011 4:27 PM
> > > > > > Subject: [DynoMotion] Re: Recovering From Limit Hit
> > > > > >
> > > > > >
> > > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > Well, that's more than a little disappointing.... I think the way Mach3 handles it is much smarter - when a limit is hit, Mach3 shuts down all axes (actually E-Stops), and remembers what direction each axis WAS moving, then disallows any further programmed moves until the limit is cleared. Jogging, however, IS enabled, PROVIDED the requested jog motion is the direction the that triggered the limit. No over-ride switch needed, and I REALLY don't want to have to add more hardware.
> > > > > >
> > > > > > This also helps allow a single set of switches to be used for both Home and Limit functions, which is especially nice on smaller machines, where space is limited. My machine has a single input, which serves as Home and Limit for all four axes, and it works perfectly under Mach3 (well, until now....).
> > > > > >
> > > > > > Regards,
> > > > > > Ray L.
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, william Carrothers <wcarrothers@> wrote:
> > > > > > >
> > > > > > > I've built an override switch into all my machines for this use.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàI call it the becarefull button.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSince you have to be carefull to trigger your machine in the right direction when you used it..
> > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > Actually my one control has both an open and close switch for this seeing one machine uses open limit switches and the other it connects has normally closed (the more proper way) switch setup.
> > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > Put in a manual switch is what I would recomend for this..ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàOnly other way would be to disable the drive and move it off manually.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàBut you in theory would loose your possition depending on the type of drives you have.
> > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > That is one thing I'm really starting to like about my AC analog servo drives.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡Ãâàthey always update possition info weather they are enabled or not, moved manually or what.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThus when I re-enable in mach the actuall possition is updated and I go on.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàReally COOL!!!ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡Ãâàdon't have to re-home the machine as much.
> > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > b.
> > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > b.
> > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > >
> > > > > > > --- On Tue, 11/15/11, himykabibble <jagboy@> wrote:
> > > > > > >
> > > > > > >
> > > > > > > From: himykabibble <jagboy@>
> > > > > > > Subject: [DynoMotion] Recovering From Limit Hit
> > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > Date: Tuesday, November 15, 2011, 7:07 PM
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Am I correct in thinking the only way to move the machine off a limit is by having a hardware limit over-ride? When I hit a limit, Mach3 goes into E-Stop, KMotion disables the axis, and there appears to be no way to even get Mach3 out of E-Stop, in order to back off the limit, without first making the limit condition go away. How do I get around this, without additional hardware?
> > > > > > >
> > > > > > > Regards,
> > > > > > > Ray L.
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 2277 |
From: himykabibble |
Date: 11/16/2011 |
Subject: Re: Recovering From Limit Hit |
Tom,
Two excellent suggestions, I'm sure I can implement. I've already got code that reliably detects limits and discerns between + and -, so setting up the "virtual limits" should be trivial to add. I'll give it a shot tonight. It also occurs to me (kinda late, I guess....) that the board my limits are interfaced through already provides an over-ride capability, I just need to hook it up to the KFlop or a switch. But, I'll try to get this approach working first.
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Ray,
> Â
> If it was easy we would have already done it :}
> Â
> I looked into the Feedhold while jogging scenario. The Feedhold does do a stop (Jog=0) so the axis will start decelerating to a stop, but then any subsequent motion commands will just cause it to accelerate again. I can't think of a solution without putting in a number of "blocking" mechanisms or somehow informing Mach3 and/or the plugin to stop jogging. Maybe a global "Fault" flag or something? I think this is an important issue but just don't know what is the best solution.
> Â
> Regarding only allowing drive in one direction:Â I think if you re-configure the limit options to only watch limits on one end and also set the mode to "Disable drive into limit" it might do what you need.
> Â
> Another workaround you might consider is to have a User program create virtual limit switches. Using the single limit switch and other information like axis position, direction of motion, set two virtual limit bits (IO 48-63). Then configure the axis to watch the virtual IO bits. But then maybe this boils down to the same thing.
> Â
> Regards
> TK
> Â
> Â
>
>
> ________________________________
> From: himykabibble <jagboy@...>
> To: DynoMotion@yahoogroups.com
> Sent: Wednesday, November 16, 2011 8:32 AM
> Subject: [DynoMotion] Re: Recovering From Limit Hit
>
>
> Â
> I've implemented a kludgey work-around, but I'd really like to get this working better. For now, I've done a Home routine that over-rides the limits. So, at least in Mach3, if I run into the + limit, I can do a home to back off. If I run into the - limit, I'll have a small problem. For KMotionCNC, I've created a user button that over-rides the limits for 2 seconds, so I have time to jog off.
>
> I've tried to write a user program to do all the limit handling, but there are several things I can't seem to get to work right. First, I can't get the axis to stop immediately, if it's being jogged (by holding down a jog key), without disabling it, which seems really brute-force to me. I'd like to stop it gracefully, so there's no position loss. Once stopped, I can't figure out how to allow only jogging away from the limit, until the limit is cleared.
>
> BTW - on my machine, it would be a LOT of work to even separate the + and - limits, as I use proximity sensors, which ride over a steel rail, and trip when they move past the end of the rail. So, there is only ONE sensor per axis, with no way to separate out + from -.
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> >
> > Tom,
> >
> > Seems to me, the logic needs to be:
> >
> > 1) If limit hit is detected, first, make a note of which axes were moving, and in which directions.
> > 2) Immediately stop ALL motion, stop the spindle, coolant off, etc. Do it quickly, but gracefully.
> > 3) Once stopped, and until the limit is cleared, we need to block ALL coordinated moves, and allow ONLY jogs on any of the axes that WERE moving when the limit was hit, AND only in the direction opposite their last motion.
> >
> > I've got the detection, and capturing of move direction working. But stopping is the first problem. StopCoordinatedMotion does not stop anything if the axis is being jogged. The only thing I've found that works is to disable the axis, which is a mighty big hammer to use for such a small nail. And I'd be concerned that doing this while trying to use a single set of switches for both Home and Limit could cause position loss, unless the axes are moving very slowly.
> >
> > I have no idea how to block only specific kinds of moves, other than by re-enabling all axes, and then re-stopping them (as above) if a move is attempted further into the limits. That seems really crude. Is there a cleaner way?
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Ray,
> > > ÃÂ
> > > Not sure what you mean by "release".
> > > ÃÂ
> > > But I think we may need to disable the axis otherwise Gcode or Jogging or MPG could still keep driving.
> > > ÃÂ
> > > After a feedhold loop calling:
> > > ÃÂ void
> > > ÃÂ
> > > and checkingUpdateStoppingState(void); // Update Stopping Status (only required for indep stopping)
> > > ÃÂ extern
> > > ÃÂ
> > > will tell is when we are stopped.ÃÂ Then disable all the axes.
> > > ÃÂ
> > > There is a command to clear the Feedhold and remain stationary.ÃÂ But that won't prevent new commandsto move.ÃÂ
> > > ÃÂ void
> > > ÃÂ
> > > TKClearStopImmediately(void); // Clear Stop Condition without resumingintCS0_StoppingState; // emergency stop in progress, 0 = not stopping, 1=stopping coord motion, 2=stopping indep, 3=fully stopped, 4=ind stopped
> > >
> > > From: himykabibble <jagboy@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Tuesday, November 15, 2011 7:08 PM
> > > Subject: [DynoMotion] Re: Recovering From Limit Hit
> > >
> > >
> > > ÃÂ
> > > Tom,
> > >
> > > OK, I figured that out a few minutes ago, and when I hit the limit, I do a StopCoordinatedMotion, which seems to FeedHold. But as soon as I release the FeedHold (though the header file says it does an E-Stop), the axis moves a short distance. I tried setting Dest=last_dest, but that didn't help. How do I stop the axis, and make sure it stays stopped? I've got logic in there that will stop it again if an attempt is made to move again in the same direction before the limit is cleared.
> > >
> > > Regards,
> > > Ray L.
> > >
> > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > >
> > > > Ray,
> > > > ÃâÃÂ
> > > > ch->Dest - ch->last_dest
> > > > Should tell you.
> > > > ÃâÃÂ
> > > > TK
> > > > ÃâÃÂ
> > > > ÃâÃÂ
> > > > From: himykabibble <jagboy@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Tuesday, November 15, 2011 6:15 PM
> > > > Subject: [DynoMotion] Re: Recovering From Limit Hit
> > > >
> > > >
> > > > ÃâÃÂ
> > > > Tom,
> > > >
> > > > How do I determine what direction an axis is moving?
> > > >
> > > > Regards,
> > > > Ray L.
> > > >
> > > > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > > >
> > > > > Tom,
> > > > >
> > > > > "Or I suppose that Mach3 scheme could be implemented with a clever User program." - what I'm trying to do right now....
> > > > >
> > > > > I do think it would be a good option to add, and I think the risk is very small. The machine will always E-Stop when the limit is first hit, and the user can assess why it happened, and whether it's wise to re-enable. And, even with Mach3, you have the option of using separate switches and making it as "safe" as you wish.
> > > > >
> > > > > Regards,
> > > > > Ray L.
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > >
> > > > > > Hi Ray,
> > > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > We should probably add that.ÃÆ'ââ¬Å¡ÃâàAlthough I always thought those techniques were dangerous and flawed.ÃÆ'ââ¬Å¡ÃâàIt assumes things were working correctly in the first place.
> > > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > If you have separate inputs to KFLOP for your + and - Limits then you can configure the limits to "Disallow drive into limit". In this case after you hit a limit and everything goes disabled, you will then be able to re-enable while still in the limit and the axis will remain enabled unless you command motion in the direction that would drive you into the limit.ÃÆ'ââ¬Å¡ÃâàBut that doesn't help in your one switch situation.
> > > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > You could add a screen button to temporarily disable limits.ÃÆ'ââ¬Å¡ÃâàÃÆ'ââ¬Å¡ÃâàThe button would send a notification to KFLOP to disable them.ÃÆ'ââ¬Å¡ÃâàThen a watchdog loop could automatically re-enable them as soon as the limit cleared.ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > Or I suppose that Mach3 scheme could be implemented with a clever User program.
> > > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > Regards
> > > > > > TK
> > > > > >
> > > > > >
> > > > > > From: himykabibble <jagboy@>
> > > > > > To: DynoMotion@yahoogroups.com
> > > > > > Sent: Tuesday, November 15, 2011 4:27 PM
> > > > > > Subject: [DynoMotion] Re: Recovering From Limit Hit
> > > > > >
> > > > > >
> > > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > Well, that's more than a little disappointing.... I think the way Mach3 handles it is much smarter - when a limit is hit, Mach3 shuts down all axes (actually E-Stops), and remembers what direction each axis WAS moving, then disallows any further programmed moves until the limit is cleared. Jogging, however, IS enabled, PROVIDED the requested jog motion is the direction the that triggered the limit. No over-ride switch needed, and I REALLY don't want to have to add more hardware.
> > > > > >
> > > > > > This also helps allow a single set of switches to be used for both Home and Limit functions, which is especially nice on smaller machines, where space is limited. My machine has a single input, which serves as Home and Limit for all four axes, and it works perfectly under Mach3 (well, until now....).
> > > > > >
> > > > > > Regards,
> > > > > > Ray L.
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, william Carrothers <wcarrothers@> wrote:
> > > > > > >
> > > > > > > I've built an override switch into all my machines for this use.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàI call it the becarefull button.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSince you have to be carefull to trigger your machine in the right direction when you used it..
> > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > Actually my one control has both an open and close switch for this seeing one machine uses open limit switches and the other it connects has normally closed (the more proper way) switch setup.
> > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > Put in a manual switch is what I would recomend for this..ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàOnly other way would be to disable the drive and move it off manually.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàBut you in theory would loose your possition depending on the type of drives you have.
> > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > That is one thing I'm really starting to like about my AC analog servo drives.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡Ãâàthey always update possition info weather they are enabled or not, moved manually or what.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThus when I re-enable in mach the actuall possition is updated and I go on.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàReally COOL!!!ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡Ãâàdon't have to re-home the machine as much.
> > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > b.
> > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > b.
> > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > >
> > > > > > > --- On Tue, 11/15/11, himykabibble <jagboy@> wrote:
> > > > > > >
> > > > > > >
> > > > > > > From: himykabibble <jagboy@>
> > > > > > > Subject: [DynoMotion] Recovering From Limit Hit
> > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > Date: Tuesday, November 15, 2011, 7:07 PM
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Am I correct in thinking the only way to move the machine off a limit is by having a hardware limit over-ride? When I hit a limit, Mach3 goes into E-Stop, KMotion disables the axis, and there appears to be no way to even get Mach3 out of E-Stop, in order to back off the limit, without first making the limit condition go away. How do I get around this, without additional hardware?
> > > > > > >
> > > > > > > Regards,
> > > > > > > Ray L.
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 2282 |
From: himykabibble |
Date: 11/16/2011 |
Subject: Re: Recovering From Limit Hit |
Tom,
I have limits working as I want using the "virtual limits" as you suggested. I have a loop in my Init that monitors the axes, and enables your limit logic in the appropriate direction only when a limit it hit. I added a "limit over-ride" button that re-enables the axes after your limit logic disables them, allowing me to back off. All works perfectly, and was easy to implement. Thanks!
I've downloaded XP SP3, and I'm going to install it on my machine PC, and see if that helps the joystick issue. I assume that test build to put up simply disables the joystick logic altogether, by doing something simple like forcing the return value from the DLL call to an error?
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Ray,
> Â
> If it was easy we would have already done it :}
> Â
> I looked into the Feedhold while jogging scenario. The Feedhold does do a stop (Jog=0) so the axis will start decelerating to a stop, but then any subsequent motion commands will just cause it to accelerate again. I can't think of a solution without putting in a number of "blocking" mechanisms or somehow informing Mach3 and/or the plugin to stop jogging. Maybe a global "Fault" flag or something? I think this is an important issue but just don't know what is the best solution.
> Â
> Regarding only allowing drive in one direction:Â I think if you re-configure the limit options to only watch limits on one end and also set the mode to "Disable drive into limit" it might do what you need.
> Â
> Another workaround you might consider is to have a User program create virtual limit switches. Using the single limit switch and other information like axis position, direction of motion, set two virtual limit bits (IO 48-63). Then configure the axis to watch the virtual IO bits. But then maybe this boils down to the same thing.
> Â
> Regards
> TK
> Â
> Â
>
>
> ________________________________
> From: himykabibble <jagboy@...>
> To: DynoMotion@yahoogroups.com
> Sent: Wednesday, November 16, 2011 8:32 AM
> Subject: [DynoMotion] Re: Recovering From Limit Hit
>
>
> Â
> I've implemented a kludgey work-around, but I'd really like to get this working better. For now, I've done a Home routine that over-rides the limits. So, at least in Mach3, if I run into the + limit, I can do a home to back off. If I run into the - limit, I'll have a small problem. For KMotionCNC, I've created a user button that over-rides the limits for 2 seconds, so I have time to jog off.
>
> I've tried to write a user program to do all the limit handling, but there are several things I can't seem to get to work right. First, I can't get the axis to stop immediately, if it's being jogged (by holding down a jog key), without disabling it, which seems really brute-force to me. I'd like to stop it gracefully, so there's no position loss. Once stopped, I can't figure out how to allow only jogging away from the limit, until the limit is cleared.
>
> BTW - on my machine, it would be a LOT of work to even separate the + and - limits, as I use proximity sensors, which ride over a steel rail, and trip when they move past the end of the rail. So, there is only ONE sensor per axis, with no way to separate out + from -.
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> >
> > Tom,
> >
> > Seems to me, the logic needs to be:
> >
> > 1) If limit hit is detected, first, make a note of which axes were moving, and in which directions.
> > 2) Immediately stop ALL motion, stop the spindle, coolant off, etc. Do it quickly, but gracefully.
> > 3) Once stopped, and until the limit is cleared, we need to block ALL coordinated moves, and allow ONLY jogs on any of the axes that WERE moving when the limit was hit, AND only in the direction opposite their last motion.
> >
> > I've got the detection, and capturing of move direction working. But stopping is the first problem. StopCoordinatedMotion does not stop anything if the axis is being jogged. The only thing I've found that works is to disable the axis, which is a mighty big hammer to use for such a small nail. And I'd be concerned that doing this while trying to use a single set of switches for both Home and Limit could cause position loss, unless the axes are moving very slowly.
> >
> > I have no idea how to block only specific kinds of moves, other than by re-enabling all axes, and then re-stopping them (as above) if a move is attempted further into the limits. That seems really crude. Is there a cleaner way?
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Ray,
> > > ÃÂ
> > > Not sure what you mean by "release".
> > > ÃÂ
> > > But I think we may need to disable the axis otherwise Gcode or Jogging or MPG could still keep driving.
> > > ÃÂ
> > > After a feedhold loop calling:
> > > ÃÂ void
> > > ÃÂ
> > > and checkingUpdateStoppingState(void); // Update Stopping Status (only required for indep stopping)
> > > ÃÂ extern
> > > ÃÂ
> > > will tell is when we are stopped.ÃÂ Then disable all the axes.
> > > ÃÂ
> > > There is a command to clear the Feedhold and remain stationary.ÃÂ But that won't prevent new commandsto move.ÃÂ
> > > ÃÂ void
> > > ÃÂ
> > > TKClearStopImmediately(void); // Clear Stop Condition without resumingintCS0_StoppingState; // emergency stop in progress, 0 = not stopping, 1=stopping coord motion, 2=stopping indep, 3=fully stopped, 4=ind stopped
> > >
> > > From: himykabibble <jagboy@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Tuesday, November 15, 2011 7:08 PM
> > > Subject: [DynoMotion] Re: Recovering From Limit Hit
> > >
> > >
> > > ÃÂ
> > > Tom,
> > >
> > > OK, I figured that out a few minutes ago, and when I hit the limit, I do a StopCoordinatedMotion, which seems to FeedHold. But as soon as I release the FeedHold (though the header file says it does an E-Stop), the axis moves a short distance. I tried setting Dest=last_dest, but that didn't help. How do I stop the axis, and make sure it stays stopped? I've got logic in there that will stop it again if an attempt is made to move again in the same direction before the limit is cleared.
> > >
> > > Regards,
> > > Ray L.
> > >
> > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > >
> > > > Ray,
> > > > ÃâÃÂ
> > > > ch->Dest - ch->last_dest
> > > > Should tell you.
> > > > ÃâÃÂ
> > > > TK
> > > > ÃâÃÂ
> > > > ÃâÃÂ
> > > > From: himykabibble <jagboy@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Tuesday, November 15, 2011 6:15 PM
> > > > Subject: [DynoMotion] Re: Recovering From Limit Hit
> > > >
> > > >
> > > > ÃâÃÂ
> > > > Tom,
> > > >
> > > > How do I determine what direction an axis is moving?
> > > >
> > > > Regards,
> > > > Ray L.
> > > >
> > > > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > > >
> > > > > Tom,
> > > > >
> > > > > "Or I suppose that Mach3 scheme could be implemented with a clever User program." - what I'm trying to do right now....
> > > > >
> > > > > I do think it would be a good option to add, and I think the risk is very small. The machine will always E-Stop when the limit is first hit, and the user can assess why it happened, and whether it's wise to re-enable. And, even with Mach3, you have the option of using separate switches and making it as "safe" as you wish.
> > > > >
> > > > > Regards,
> > > > > Ray L.
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > >
> > > > > > Hi Ray,
> > > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > We should probably add that.ÃÆ'ââ¬Å¡ÃâàAlthough I always thought those techniques were dangerous and flawed.ÃÆ'ââ¬Å¡ÃâàIt assumes things were working correctly in the first place.
> > > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > If you have separate inputs to KFLOP for your + and - Limits then you can configure the limits to "Disallow drive into limit". In this case after you hit a limit and everything goes disabled, you will then be able to re-enable while still in the limit and the axis will remain enabled unless you command motion in the direction that would drive you into the limit.ÃÆ'ââ¬Å¡ÃâàBut that doesn't help in your one switch situation.
> > > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > You could add a screen button to temporarily disable limits.ÃÆ'ââ¬Å¡ÃâàÃÆ'ââ¬Å¡ÃâàThe button would send a notification to KFLOP to disable them.ÃÆ'ââ¬Å¡ÃâàThen a watchdog loop could automatically re-enable them as soon as the limit cleared.ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > Or I suppose that Mach3 scheme could be implemented with a clever User program.
> > > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > Regards
> > > > > > TK
> > > > > >
> > > > > >
> > > > > > From: himykabibble <jagboy@>
> > > > > > To: DynoMotion@yahoogroups.com
> > > > > > Sent: Tuesday, November 15, 2011 4:27 PM
> > > > > > Subject: [DynoMotion] Re: Recovering From Limit Hit
> > > > > >
> > > > > >
> > > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > Well, that's more than a little disappointing.... I think the way Mach3 handles it is much smarter - when a limit is hit, Mach3 shuts down all axes (actually E-Stops), and remembers what direction each axis WAS moving, then disallows any further programmed moves until the limit is cleared. Jogging, however, IS enabled, PROVIDED the requested jog motion is the direction the that triggered the limit. No over-ride switch needed, and I REALLY don't want to have to add more hardware.
> > > > > >
> > > > > > This also helps allow a single set of switches to be used for both Home and Limit functions, which is especially nice on smaller machines, where space is limited. My machine has a single input, which serves as Home and Limit for all four axes, and it works perfectly under Mach3 (well, until now....).
> > > > > >
> > > > > > Regards,
> > > > > > Ray L.
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, william Carrothers <wcarrothers@> wrote:
> > > > > > >
> > > > > > > I've built an override switch into all my machines for this use.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàI call it the becarefull button.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSince you have to be carefull to trigger your machine in the right direction when you used it..
> > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > Actually my one control has both an open and close switch for this seeing one machine uses open limit switches and the other it connects has normally closed (the more proper way) switch setup.
> > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > Put in a manual switch is what I would recomend for this..ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàOnly other way would be to disable the drive and move it off manually.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàBut you in theory would loose your possition depending on the type of drives you have.
> > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > That is one thing I'm really starting to like about my AC analog servo drives.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡Ãâàthey always update possition info weather they are enabled or not, moved manually or what.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThus when I re-enable in mach the actuall possition is updated and I go on.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàReally COOL!!!ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡Ãâàdon't have to re-home the machine as much.
> > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > b.
> > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > b.
> > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > >
> > > > > > > --- On Tue, 11/15/11, himykabibble <jagboy@> wrote:
> > > > > > >
> > > > > > >
> > > > > > > From: himykabibble <jagboy@>
> > > > > > > Subject: [DynoMotion] Recovering From Limit Hit
> > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > Date: Tuesday, November 15, 2011, 7:07 PM
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Am I correct in thinking the only way to move the machine off a limit is by having a hardware limit over-ride? When I hit a limit, Mach3 goes into E-Stop, KMotion disables the axis, and there appears to be no way to even get Mach3 out of E-Stop, in order to back off the limit, without first making the limit condition go away. How do I get around this, without additional hardware?
> > > > > > >
> > > > > > > Regards,
> > > > > > > Ray L.
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 2283 |
From: Tom Kerekes |
Date: 11/16/2011 |
Subject: Re: Recovering From Limit Hit |
Hi Ray,
Since you have VS2008 you might set a breakpoint on the line below to check what it is returning.
MMRESULT result = joyGetPosEx(JOYSTICKID1,&ji);
if (result == JOYERR_NOERROR)
Here is Microsoft's definition of the call we are making to check if Joystick #0 is present.
You could also force an error as a temporary workaround to your problem.
Regards
TK
Group: DynoMotion |
Message: 2285 |
From: himykabibble |
Date: 11/17/2011 |
Subject: Re: Recovering From Limit Hit |
Tom,
I thought about that yesterday, but I have no easy way to install VS on that machine - it no longer has a CD/DVD drive. I'll see if I can find a large enough FLASHDrive to copy it to. I thought it would also be interesting to see if the JoyGetPos method works properly.
I do still plan to install SP3, and see if that has any effect.
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Ray,
> Â
> Since you have VS2008 you might set a breakpoint on the line below to check what it is returning. Â
> Â
> MMRESULT result = joyGetPosEx(JOYSTICKID1,&ji); if(result == JOYERR_NOERROR)
> Â
> Here is Microsoft's definition of the call we are making to check if Joystick #0 is present.
> Â
> http://msdn.microsoft.com/en-us/library/windows/desktop/dd757108(v=vs.85).aspx
> Â
> You could also force an error as a temporary workaround to your problem.
>
> Regards
> TK
>
>
>
>
> From: himykabibble <jagboy@...>
> To: DynoMotion@yahoogroups.com
> Sent: Wednesday, November 16, 2011 10:55 PM
> Subject: [DynoMotion] Re: Recovering From Limit Hit
>
>
> Â
> Tom,
>
> I have limits working as I want using the "virtual limits" as you suggested. I have a loop in my Init that monitors the axes, and enables your limit logic in the appropriate direction only when a limit it hit. I added a "limit over-ride" button that re-enables the axes after your limit logic disables them, allowing me to back off. All works perfectly, and was easy to implement. Thanks!
>
> I've downloaded XP SP3, and I'm going to install it on my machine PC, and see if that helps the joystick issue. I assume that test build to put up simply disables the joystick logic altogether, by doing something simple like forcing the return value from the DLL call to an error?
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Ray,
> > ÃÂ
> > If it was easy we would have already done it :}
> > ÃÂ
> > I looked into the Feedhold while jogging scenario.ÃÂ The Feedhold does do a stop (Jog=0) so the axis will start decelerating to a stop, but then any subsequent motion commands will just cause it to accelerate again.ÃÂ I can't think of a solution without putting in a number of "blocking" mechanisms or somehow informing Mach3 and/or the plugin to stop jogging.ÃÂ Maybe a global "Fault" flag or something?ÃÂ I think this is an important issue but just don't know what is the best solution.
> > ÃÂ
> > Regarding only allowing drive in one direction:ÃÂ I think if you re-configure the limit options to only watch limits on one end and also set the mode to "Disable drive into limit" it might do what you need.
> > ÃÂ
> > Another workaroundÃÂ you might consider is to have a User program create virtual limit switches.ÃÂ Using the single limit switch and other information like axis position, direction of motion, set two virtual limit bits (IO 48-63).ÃÂ Then configure the axis to watch the virtual IO bits. But then maybe this boils down to the same thing.
> > ÃÂ
> > Regards
> > TK
> > ÃÂ
> > ÃÂ
> >
> >
> > ________________________________
> > From: himykabibble <jagboy@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Wednesday, November 16, 2011 8:32 AM
> > Subject: [DynoMotion] Re: Recovering From Limit Hit
> >
> >
> > ÃÂ
> > I've implemented a kludgey work-around, but I'd really like to get this working better. For now, I've done a Home routine that over-rides the limits. So, at least in Mach3, if I run into the + limit, I can do a home to back off. If I run into the - limit, I'll have a small problem. For KMotionCNC, I've created a user button that over-rides the limits for 2 seconds, so I have time to jog off.
> >
> > I've tried to write a user program to do all the limit handling, but there are several things I can't seem to get to work right. First, I can't get the axis to stop immediately, if it's being jogged (by holding down a jog key), without disabling it, which seems really brute-force to me. I'd like to stop it gracefully, so there's no position loss. Once stopped, I can't figure out how to allow only jogging away from the limit, until the limit is cleared.
> >
> > BTW - on my machine, it would be a LOT of work to even separate the + and - limits, as I use proximity sensors, which ride over a steel rail, and trip when they move past the end of the rail. So, there is only ONE sensor per axis, with no way to separate out + from -.
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > >
> > > Tom,
> > >
> > > Seems to me, the logic needs to be:
> > >
> > > 1) If limit hit is detected, first, make a note of which axes were moving, and in which directions.
> > > 2) Immediately stop ALL motion, stop the spindle, coolant off, etc. Do it quickly, but gracefully.
> > > 3) Once stopped, and until the limit is cleared, we need to block ALL coordinated moves, and allow ONLY jogs on any of the axes that WERE moving when the limit was hit, AND only in the direction opposite their last motion.
> > >
> > > I've got the detection, and capturing of move direction working. But stopping is the first problem. StopCoordinatedMotion does not stop anything if the axis is being jogged. The only thing I've found that works is to disable the axis, which is a mighty big hammer to use for such a small nail. And I'd be concerned that doing this while trying to use a single set of switches for both Home and Limit could cause position loss, unless the axes are moving very slowly.
> > >
> > > I have no idea how to block only specific kinds of moves, other than by re-enabling all axes, and then re-stopping them (as above) if a move is attempted further into the limits. That seems really crude. Is there a cleaner way?
> > >
> > > Regards,
> > > Ray L.
> > >
> > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > >
> > > > Hi Ray,
> > > > ÃâÃÂ
> > > > Not sure what you mean by "release".
> > > > ÃâÃÂ
> > > > But I think we may need to disable the axis otherwise Gcode or Jogging or MPG could still keep driving.
> > > > ÃâÃÂ
> > > > After a feedhold loop calling:
> > > > Ãâàvoid
> > > > ÃâÃÂ
> > > > and checkingUpdateStoppingState(void); // Update Stopping Status (only required for indep stopping)
> > > > Ãâàextern
> > > > ÃâÃÂ
> > > > will tell is when we are stopped.ÃâàThen disable all the axes.
> > > > ÃâÃÂ
> > > > There is a command to clear the Feedhold and remain stationary.ÃâàBut that won't prevent new commandsto move.ÃâÃÂ
> > > > Ãâàvoid
> > > > ÃâÃÂ
> > > > TKClearStopImmediately(void); // Clear Stop Condition without resumingintCS0_StoppingState; // emergency stop in progress, 0 = not stopping, 1=stopping coord motion, 2=stopping indep, 3=fully stopped, 4=ind stopped
> > > >
> > > > From: himykabibble <jagboy@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Tuesday, November 15, 2011 7:08 PM
> > > > Subject: [DynoMotion] Re: Recovering From Limit Hit
> > > >
> > > >
> > > > ÃâÃÂ
> > > > Tom,
> > > >
> > > > OK, I figured that out a few minutes ago, and when I hit the limit, I do a StopCoordinatedMotion, which seems to FeedHold. But as soon as I release the FeedHold (though the header file says it does an E-Stop), the axis moves a short distance. I tried setting Dest=last_dest, but that didn't help. How do I stop the axis, and make sure it stays stopped? I've got logic in there that will stop it again if an attempt is made to move again in the same direction before the limit is cleared.
> > > >
> > > > Regards,
> > > > Ray L.
> > > >
> > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > >
> > > > > Ray,
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > ch->Dest - ch->last_dest
> > > > > Should tell you.
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > TK
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > From: himykabibble <jagboy@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Tuesday, November 15, 2011 6:15 PM
> > > > > Subject: [DynoMotion] Re: Recovering From Limit Hit
> > > > >
> > > > >
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > Tom,
> > > > >
> > > > > How do I determine what direction an axis is moving?
> > > > >
> > > > > Regards,
> > > > > Ray L.
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > > > >
> > > > > > Tom,
> > > > > >
> > > > > > "Or I suppose that Mach3 scheme could be implemented with a clever User program." - what I'm trying to do right now....
> > > > > >
> > > > > > I do think it would be a good option to add, and I think the risk is very small. The machine will always E-Stop when the limit is first hit, and the user can assess why it happened, and whether it's wise to re-enable. And, even with Mach3, you have the option of using separate switches and making it as "safe" as you wish.
> > > > > >
> > > > > > Regards,
> > > > > > Ray L.
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > >
> > > > > > > Hi Ray,
> > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > We should probably add that.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàAlthough I always thought those techniques were dangerous and flawed.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt assumes things were working correctly in the first place.
> > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > If you have separate inputs to KFLOP for your + and - Limits then you can configure the limits to "Disallow drive into limit". In this case after you hit a limit and everything goes disabled, you will then be able to re-enable while still in the limit and the axis will remain enabled unless you command motion in the direction that would drive you into the limit.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàBut that doesn't help in your one switch situation.
> > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > You could add a screen button to temporarily disable limits.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe button would send a notification to KFLOP to disable them.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThen a watchdog loop could automatically re-enable them as soon as the limit cleared.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > Or I suppose that Mach3 scheme could be implemented with a clever User program.
> > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > Regards
> > > > > > > TK
> > > > > > >
> > > > > > >
> > > > > > > From: himykabibble <jagboy@>
> > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > Sent: Tuesday, November 15, 2011 4:27 PM
> > > > > > > Subject: [DynoMotion] Re: Recovering From Limit Hit
> > > > > > >
> > > > > > >
> > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > Well, that's more than a little disappointing.... I think the way Mach3 handles it is much smarter - when a limit is hit, Mach3 shuts down all axes (actually E-Stops), and remembers what direction each axis WAS moving, then disallows any further programmed moves until the limit is cleared. Jogging, however, IS enabled, PROVIDED the requested jog motion is the direction the that triggered the limit. No over-ride switch needed, and I REALLY don't want to have to add more hardware.
> > > > > > >
> > > > > > > This also helps allow a single set of switches to be used for both Home and Limit functions, which is especially nice on smaller machines, where space is limited. My machine has a single input, which serves as Home and Limit for all four axes, and it works perfectly under Mach3 (well, until now....).
> > > > > > >
> > > > > > > Regards,
> > > > > > > Ray L.
> > > > > > >
> > > > > > > --- In DynoMotion@yahoogroups.com, william Carrothers <wcarrothers@> wrote:
> > > > > > > >
> > > > > > > > I've built an override switch into all my machines for this use.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàI call it the becarefull button.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSince you have to be carefull to trigger your machine in the right direction when you used it..
> > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > Actually my one control has both an open and close switch for this seeing one machine uses open limit switches and the other it connects has normally closed (the more proper way) switch setup.
> > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > Put in a manual switch is what I would recomend for this..ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàOnly other way would be to disable the drive and move it off manually.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàBut you in theory would loose your possition depending on the type of drives you have.
> > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > That is one thing I'm really starting to like about my AC analog servo drives.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡Ãâàthey always update possition info weather they are enabled or not, moved manually or what.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThus when I re-enable in mach the actuall possition is updated and I go on.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàReally COOL!!!ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡Ãâàdon't have to re-home the machine as much.
> > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > b.
> > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > b.
> > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > >
> > > > > > > > --- On Tue, 11/15/11, himykabibble <jagboy@> wrote:
> > > > > > > >
> > > > > > > >
> > > > > > > > From: himykabibble <jagboy@>
> > > > > > > > Subject: [DynoMotion] Recovering From Limit Hit
> > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > Date: Tuesday, November 15, 2011, 7:07 PM
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > Am I correct in thinking the only way to move the machine off a limit is by having a hardware limit over-ride? When I hit a limit, Mach3 goes into E-Stop, KMotion disables the axis, and there appears to be no way to even get Mach3 out of E-Stop, in order to back off the limit, without first making the limit condition go away. How do I get around this, without additional hardware?
> > > > > > > >
> > > > > > > > Regards,
> > > > > > > > Ray L.
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 2286 |
From: himykabibble |
Date: 11/17/2011 |
Subject: Re: Recovering From Limit Hit |
Tom,
One minor problem with the limit over-ride - when I re-enable the axis after a limit trip, the EnableAxis() call appears to be clearing the axis position, so the DRO goes to 0.0. Is there any way to prevent this? The position really should stay as it is.
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Ray,
> Â
> Since you have VS2008 you might set a breakpoint on the line below to check what it is returning. Â
> Â
> MMRESULT result = joyGetPosEx(JOYSTICKID1,&ji); if(result == JOYERR_NOERROR)
> Â
> Here is Microsoft's definition of the call we are making to check if Joystick #0 is present.
> Â
> http://msdn.microsoft.com/en-us/library/windows/desktop/dd757108(v=vs.85).aspx
> Â
> You could also force an error as a temporary workaround to your problem.
>
> Regards
> TK
>
>
>
>
> From: himykabibble <jagboy@...>
> To: DynoMotion@yahoogroups.com
> Sent: Wednesday, November 16, 2011 10:55 PM
> Subject: [DynoMotion] Re: Recovering From Limit Hit
>
>
> Â
> Tom,
>
> I have limits working as I want using the "virtual limits" as you suggested. I have a loop in my Init that monitors the axes, and enables your limit logic in the appropriate direction only when a limit it hit. I added a "limit over-ride" button that re-enables the axes after your limit logic disables them, allowing me to back off. All works perfectly, and was easy to implement. Thanks!
>
> I've downloaded XP SP3, and I'm going to install it on my machine PC, and see if that helps the joystick issue. I assume that test build to put up simply disables the joystick logic altogether, by doing something simple like forcing the return value from the DLL call to an error?
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Ray,
> > ÃÂ
> > If it was easy we would have already done it :}
> > ÃÂ
> > I looked into the Feedhold while jogging scenario.ÃÂ The Feedhold does do a stop (Jog=0) so the axis will start decelerating to a stop, but then any subsequent motion commands will just cause it to accelerate again.ÃÂ I can't think of a solution without putting in a number of "blocking" mechanisms or somehow informing Mach3 and/or the plugin to stop jogging.ÃÂ Maybe a global "Fault" flag or something?ÃÂ I think this is an important issue but just don't know what is the best solution.
> > ÃÂ
> > Regarding only allowing drive in one direction:ÃÂ I think if you re-configure the limit options to only watch limits on one end and also set the mode to "Disable drive into limit" it might do what you need.
> > ÃÂ
> > Another workaroundÃÂ you might consider is to have a User program create virtual limit switches.ÃÂ Using the single limit switch and other information like axis position, direction of motion, set two virtual limit bits (IO 48-63).ÃÂ Then configure the axis to watch the virtual IO bits. But then maybe this boils down to the same thing.
> > ÃÂ
> > Regards
> > TK
> > ÃÂ
> > ÃÂ
> >
> >
> > ________________________________
> > From: himykabibble <jagboy@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Wednesday, November 16, 2011 8:32 AM
> > Subject: [DynoMotion] Re: Recovering From Limit Hit
> >
> >
> > ÃÂ
> > I've implemented a kludgey work-around, but I'd really like to get this working better. For now, I've done a Home routine that over-rides the limits. So, at least in Mach3, if I run into the + limit, I can do a home to back off. If I run into the - limit, I'll have a small problem. For KMotionCNC, I've created a user button that over-rides the limits for 2 seconds, so I have time to jog off.
> >
> > I've tried to write a user program to do all the limit handling, but there are several things I can't seem to get to work right. First, I can't get the axis to stop immediately, if it's being jogged (by holding down a jog key), without disabling it, which seems really brute-force to me. I'd like to stop it gracefully, so there's no position loss. Once stopped, I can't figure out how to allow only jogging away from the limit, until the limit is cleared.
> >
> > BTW - on my machine, it would be a LOT of work to even separate the + and - limits, as I use proximity sensors, which ride over a steel rail, and trip when they move past the end of the rail. So, there is only ONE sensor per axis, with no way to separate out + from -.
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > >
> > > Tom,
> > >
> > > Seems to me, the logic needs to be:
> > >
> > > 1) If limit hit is detected, first, make a note of which axes were moving, and in which directions.
> > > 2) Immediately stop ALL motion, stop the spindle, coolant off, etc. Do it quickly, but gracefully.
> > > 3) Once stopped, and until the limit is cleared, we need to block ALL coordinated moves, and allow ONLY jogs on any of the axes that WERE moving when the limit was hit, AND only in the direction opposite their last motion.
> > >
> > > I've got the detection, and capturing of move direction working. But stopping is the first problem. StopCoordinatedMotion does not stop anything if the axis is being jogged. The only thing I've found that works is to disable the axis, which is a mighty big hammer to use for such a small nail. And I'd be concerned that doing this while trying to use a single set of switches for both Home and Limit could cause position loss, unless the axes are moving very slowly.
> > >
> > > I have no idea how to block only specific kinds of moves, other than by re-enabling all axes, and then re-stopping them (as above) if a move is attempted further into the limits. That seems really crude. Is there a cleaner way?
> > >
> > > Regards,
> > > Ray L.
> > >
> > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > >
> > > > Hi Ray,
> > > > ÃâÃÂ
> > > > Not sure what you mean by "release".
> > > > ÃâÃÂ
> > > > But I think we may need to disable the axis otherwise Gcode or Jogging or MPG could still keep driving.
> > > > ÃâÃÂ
> > > > After a feedhold loop calling:
> > > > Ãâàvoid
> > > > ÃâÃÂ
> > > > and checkingUpdateStoppingState(void); // Update Stopping Status (only required for indep stopping)
> > > > Ãâàextern
> > > > ÃâÃÂ
> > > > will tell is when we are stopped.ÃâàThen disable all the axes.
> > > > ÃâÃÂ
> > > > There is a command to clear the Feedhold and remain stationary.ÃâàBut that won't prevent new commandsto move.ÃâÃÂ
> > > > Ãâàvoid
> > > > ÃâÃÂ
> > > > TKClearStopImmediately(void); // Clear Stop Condition without resumingintCS0_StoppingState; // emergency stop in progress, 0 = not stopping, 1=stopping coord motion, 2=stopping indep, 3=fully stopped, 4=ind stopped
> > > >
> > > > From: himykabibble <jagboy@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Tuesday, November 15, 2011 7:08 PM
> > > > Subject: [DynoMotion] Re: Recovering From Limit Hit
> > > >
> > > >
> > > > ÃâÃÂ
> > > > Tom,
> > > >
> > > > OK, I figured that out a few minutes ago, and when I hit the limit, I do a StopCoordinatedMotion, which seems to FeedHold. But as soon as I release the FeedHold (though the header file says it does an E-Stop), the axis moves a short distance. I tried setting Dest=last_dest, but that didn't help. How do I stop the axis, and make sure it stays stopped? I've got logic in there that will stop it again if an attempt is made to move again in the same direction before the limit is cleared.
> > > >
> > > > Regards,
> > > > Ray L.
> > > >
> > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > >
> > > > > Ray,
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > ch->Dest - ch->last_dest
> > > > > Should tell you.
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > TK
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > From: himykabibble <jagboy@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Tuesday, November 15, 2011 6:15 PM
> > > > > Subject: [DynoMotion] Re: Recovering From Limit Hit
> > > > >
> > > > >
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > Tom,
> > > > >
> > > > > How do I determine what direction an axis is moving?
> > > > >
> > > > > Regards,
> > > > > Ray L.
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > > > >
> > > > > > Tom,
> > > > > >
> > > > > > "Or I suppose that Mach3 scheme could be implemented with a clever User program." - what I'm trying to do right now....
> > > > > >
> > > > > > I do think it would be a good option to add, and I think the risk is very small. The machine will always E-Stop when the limit is first hit, and the user can assess why it happened, and whether it's wise to re-enable. And, even with Mach3, you have the option of using separate switches and making it as "safe" as you wish.
> > > > > >
> > > > > > Regards,
> > > > > > Ray L.
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > >
> > > > > > > Hi Ray,
> > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > We should probably add that.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàAlthough I always thought those techniques were dangerous and flawed.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt assumes things were working correctly in the first place.
> > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > If you have separate inputs to KFLOP for your + and - Limits then you can configure the limits to "Disallow drive into limit". In this case after you hit a limit and everything goes disabled, you will then be able to re-enable while still in the limit and the axis will remain enabled unless you command motion in the direction that would drive you into the limit.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàBut that doesn't help in your one switch situation.
> > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > You could add a screen button to temporarily disable limits.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe button would send a notification to KFLOP to disable them.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThen a watchdog loop could automatically re-enable them as soon as the limit cleared.ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > Or I suppose that Mach3 scheme could be implemented with a clever User program.
> > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > Regards
> > > > > > > TK
> > > > > > >
> > > > > > >
> > > > > > > From: himykabibble <jagboy@>
> > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > Sent: Tuesday, November 15, 2011 4:27 PM
> > > > > > > Subject: [DynoMotion] Re: Recovering From Limit Hit
> > > > > > >
> > > > > > >
> > > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > Well, that's more than a little disappointing.... I think the way Mach3 handles it is much smarter - when a limit is hit, Mach3 shuts down all axes (actually E-Stops), and remembers what direction each axis WAS moving, then disallows any further programmed moves until the limit is cleared. Jogging, however, IS enabled, PROVIDED the requested jog motion is the direction the that triggered the limit. No over-ride switch needed, and I REALLY don't want to have to add more hardware.
> > > > > > >
> > > > > > > This also helps allow a single set of switches to be used for both Home and Limit functions, which is especially nice on smaller machines, where space is limited. My machine has a single input, which serves as Home and Limit for all four axes, and it works perfectly under Mach3 (well, until now....).
> > > > > > >
> > > > > > > Regards,
> > > > > > > Ray L.
> > > > > > >
> > > > > > > --- In DynoMotion@yahoogroups.com, william Carrothers <wcarrothers@> wrote:
> > > > > > > >
> > > > > > > > I've built an override switch into all my machines for this use.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàI call it the becarefull button.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSince you have to be carefull to trigger your machine in the right direction when you used it..
> > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > Actually my one control has both an open and close switch for this seeing one machine uses open limit switches and the other it connects has normally closed (the more proper way) switch setup.
> > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > Put in a manual switch is what I would recomend for this..ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàOnly other way would be to disable the drive and move it off manually.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàBut you in theory would loose your possition depending on the type of drives you have.
> > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > That is one thing I'm really starting to like about my AC analog servo drives.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡Ãâàthey always update possition info weather they are enabled or not, moved manually or what.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThus when I re-enable in mach the actuall possition is updated and I go on.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàReally COOL!!!ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡Ãâàdon't have to re-home the machine as much.
> > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > b.
> > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > b.
> > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > >
> > > > > > > > --- On Tue, 11/15/11, himykabibble <jagboy@> wrote:
> > > > > > > >
> > > > > > > >
> > > > > > > > From: himykabibble <jagboy@>
> > > > > > > > Subject: [DynoMotion] Recovering From Limit Hit
> > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > Date: Tuesday, November 15, 2011, 7:07 PM
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > Am I correct in thinking the only way to move the machine off a limit is by having a hardware limit over-ride? When I hit a limit, Mach3 goes into E-Stop, KMotion disables the axis, and there appears to be no way to even get Mach3 out of E-Stop, in order to back off the limit, without first making the limit condition go away. How do I get around this, without additional hardware?
> > > > > > > >
> > > > > > > > Regards,
> > > > > > > > Ray L.
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 2287 |
From: Tom Kerekes |
Date: 11/17/2011 |
Subject: Re: Recovering From Limit Hit |
Hi Ray,
In that case you might just modify the code to throw up a message box with the result, then copy the KMotionCNC.exe to the Computer to test.
Regards
TK
Group: DynoMotion |
Message: 2288 |
From: Tom Kerekes |
Date: 11/17/2011 |
Subject: Re: Recovering From Limit Hit |
Hi Ray,
To enable axis and while setting the Destination to the current Destination use:
EnableAxisDest(0,ch0->Dest);
TK
Group: DynoMotion |
Message: 2289 |
From: himykabibble |
Date: 11/17/2011 |
Subject: Re: Recovering From Limit Hit |
Tom,
That took care of that problem. Now how do I stop a MoveAtRel before it completes? I'm porting over my probing routines, and I need to be able to command an axis move of a specified distance, then terminate it early when the probe makes contacts. Alternatively, I can Jog(), but I then would need to monitor how far it's moved, and stop the jog after going a specific distance. I've tried everything I can think of, and can't make this work (short of tricking it with limits...).
Wouldn't it be handy to have a "Stop(axis)" function?
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Ray,
> Â
> To enable axis and while setting the Destination to the current Destination use:
> Â
> EnableAxisDest(0,ch0->Dest);
> Â
> TK
>
> From: himykabibble <jagboy@...>
> To: DynoMotion@yahoogroups.com
> Sent: Thursday, November 17, 2011 2:55 PM
> Subject: [DynoMotion] Re: Recovering From Limit Hit
>
>
> Â
> Tom,
>
> One minor problem with the limit over-ride - when I re-enable the axis after a limit trip, the EnableAxis() call appears to be clearing the axis position, so the DRO goes to 0.0. Is there any way to prevent this? The position really should stay as it is.
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Ray,
> > ÃÂ
> > Since you have VS2008 you might set a breakpoint on the line below to check what it is returning.ÃÂ ÃÂ
> > ÃÂ
> > MMRESULT result = joyGetPosEx(JOYSTICKID1,&ji); if(result == JOYERR_NOERROR)
> > ÃÂ
> > Here is Microsoft's definition of the call we are making to check if Joystick #0 is present.
> > ÃÂ
> > http://msdn.microsoft.com/en-us/library/windows/desktop/dd757108(v=vs.85).aspx
> > ÃÂ
> > You could also force an error as a temporary workaround to your problem.
> >
> > Regards
> > TK
> >
> >
> >
> >
> > From: himykabibble <jagboy@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Wednesday, November 16, 2011 10:55 PM
> > Subject: [DynoMotion] Re: Recovering From Limit Hit
> >
> >
> > ÃÂ
> > Tom,
> >
> > I have limits working as I want using the "virtual limits" as you suggested. I have a loop in my Init that monitors the axes, and enables your limit logic in the appropriate direction only when a limit it hit. I added a "limit over-ride" button that re-enables the axes after your limit logic disables them, allowing me to back off. All works perfectly, and was easy to implement. Thanks!
> >
> > I've downloaded XP SP3, and I'm going to install it on my machine PC, and see if that helps the joystick issue. I assume that test build to put up simply disables the joystick logic altogether, by doing something simple like forcing the return value from the DLL call to an error?
> >
> > Regards,
> > Ray L.
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Ray,
> > > ÃâÃÂ
> > > If it was easy we would have already done it :}
> > > ÃâÃÂ
> > > I looked into the Feedhold while jogging scenario.ÃâàThe Feedhold does do a stop (Jog=0) so the axis will start decelerating to a stop, but then any subsequent motion commands will just cause it to accelerate again.ÃâàI can't think of a solution without putting in a number of "blocking" mechanisms or somehow informing Mach3 and/or the plugin to stop jogging.ÃâàMaybe a global "Fault" flag or something?ÃâàI think this is an important issue but just don't know what is the best solution.
> > > ÃâÃÂ
> > > Regarding only allowing drive in one direction:ÃâàI think if you re-configure the limit options to only watch limits on one end and also set the mode to "Disable drive into limit" it might do what you need.
> > > ÃâÃÂ
> > > Another workaroundÃâàyou might consider is to have a User program create virtual limit switches.ÃâàUsing the single limit switch and other information like axis position, direction of motion, set two virtual limit bits (IO 48-63).ÃâàThen configure the axis to watch the virtual IO bits. But then maybe this boils down to the same thing.
> > > ÃâÃÂ
> > > Regards
> > > TK
> > > ÃâÃÂ
> > > ÃâÃÂ
> > >
> > >
> > > ________________________________
> > > From: himykabibble <jagboy@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Wednesday, November 16, 2011 8:32 AM
> > > Subject: [DynoMotion] Re: Recovering From Limit Hit
> > >
> > >
> > > ÃâÃÂ
> > > I've implemented a kludgey work-around, but I'd really like to get this working better. For now, I've done a Home routine that over-rides the limits. So, at least in Mach3, if I run into the + limit, I can do a home to back off. If I run into the - limit, I'll have a small problem. For KMotionCNC, I've created a user button that over-rides the limits for 2 seconds, so I have time to jog off.
> > >
> > > I've tried to write a user program to do all the limit handling, but there are several things I can't seem to get to work right. First, I can't get the axis to stop immediately, if it's being jogged (by holding down a jog key), without disabling it, which seems really brute-force to me. I'd like to stop it gracefully, so there's no position loss. Once stopped, I can't figure out how to allow only jogging away from the limit, until the limit is cleared.
> > >
> > > BTW - on my machine, it would be a LOT of work to even separate the + and - limits, as I use proximity sensors, which ride over a steel rail, and trip when they move past the end of the rail. So, there is only ONE sensor per axis, with no way to separate out + from -.
> > >
> > > Regards,
> > > Ray L.
> > >
> > > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > >
> > > > Tom,
> > > >
> > > > Seems to me, the logic needs to be:
> > > >
> > > > 1) If limit hit is detected, first, make a note of which axes were moving, and in which directions.
> > > > 2) Immediately stop ALL motion, stop the spindle, coolant off, etc. Do it quickly, but gracefully.
> > > > 3) Once stopped, and until the limit is cleared, we need to block ALL coordinated moves, and allow ONLY jogs on any of the axes that WERE moving when the limit was hit, AND only in the direction opposite their last motion.
> > > >
> > > > I've got the detection, and capturing of move direction working. But stopping is the first problem. StopCoordinatedMotion does not stop anything if the axis is being jogged. The only thing I've found that works is to disable the axis, which is a mighty big hammer to use for such a small nail. And I'd be concerned that doing this while trying to use a single set of switches for both Home and Limit could cause position loss, unless the axes are moving very slowly.
> > > >
> > > > I have no idea how to block only specific kinds of moves, other than by re-enabling all axes, and then re-stopping them (as above) if a move is attempted further into the limits. That seems really crude. Is there a cleaner way?
> > > >
> > > > Regards,
> > > > Ray L.
> > > >
> > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > >
> > > > > Hi Ray,
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > Not sure what you mean by "release".
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > But I think we may need to disable the axis otherwise Gcode or Jogging or MPG could still keep driving.
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > After a feedhold loop calling:
> > > > > ÃÆ'ââ¬Å¡Ãâàvoid
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > and checkingUpdateStoppingState(void); // Update Stopping Status (only required for indep stopping)
> > > > > ÃÆ'ââ¬Å¡Ãâàextern
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > will tell is when we are stopped.ÃÆ'ââ¬Å¡ÃâàThen disable all the axes.
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > There is a command to clear the Feedhold and remain stationary.ÃÆ'ââ¬Å¡ÃâàBut that won't prevent new commandsto move.ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > ÃÆ'ââ¬Å¡Ãâàvoid
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > TKClearStopImmediately(void); // Clear Stop Condition without resumingintCS0_StoppingState; // emergency stop in progress, 0 = not stopping, 1=stopping coord motion, 2=stopping indep, 3=fully stopped, 4=ind stopped
> > > > >
> > > > > From: himykabibble <jagboy@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Tuesday, November 15, 2011 7:08 PM
> > > > > Subject: [DynoMotion] Re: Recovering From Limit Hit
> > > > >
> > > > >
> > > > > ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > Tom,
> > > > >
> > > > > OK, I figured that out a few minutes ago, and when I hit the limit, I do a StopCoordinatedMotion, which seems to FeedHold. But as soon as I release the FeedHold (though the header file says it does an E-Stop), the axis moves a short distance. I tried setting Dest=last_dest, but that didn't help. How do I stop the axis, and make sure it stays stopped? I've got logic in there that will stop it again if an attempt is made to move again in the same direction before the limit is cleared.
> > > > >
> > > > > Regards,
> > > > > Ray L.
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > >
> > > > > > Ray,
> > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > ch->Dest - ch->last_dest
> > > > > > Should tell you.
> > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > TK
> > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > From: himykabibble <jagboy@>
> > > > > > To: DynoMotion@yahoogroups.com
> > > > > > Sent: Tuesday, November 15, 2011 6:15 PM
> > > > > > Subject: [DynoMotion] Re: Recovering From Limit Hit
> > > > > >
> > > > > >
> > > > > > ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > Tom,
> > > > > >
> > > > > > How do I determine what direction an axis is moving?
> > > > > >
> > > > > > Regards,
> > > > > > Ray L.
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@> wrote:
> > > > > > >
> > > > > > > Tom,
> > > > > > >
> > > > > > > "Or I suppose that Mach3 scheme could be implemented with a clever User program." - what I'm trying to do right now....
> > > > > > >
> > > > > > > I do think it would be a good option to add, and I think the risk is very small. The machine will always E-Stop when the limit is first hit, and the user can assess why it happened, and whether it's wise to re-enable. And, even with Mach3, you have the option of using separate switches and making it as "safe" as you wish.
> > > > > > >
> > > > > > > Regards,
> > > > > > > Ray L.
> > > > > > >
> > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > >
> > > > > > > > Hi Ray,
> > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > We should probably add that.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàAlthough I always thought those techniques were dangerous and flawed.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàIt assumes things were working correctly in the first place.
> > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > If you have separate inputs to KFLOP for your + and - Limits then you can configure the limits to "Disallow drive into limit". In this case after you hit a limit and everything goes disabled, you will then be able to re-enable while still in the limit and the axis will remain enabled unless you command motion in the direction that would drive you into the limit.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàBut that doesn't help in your one switch situation.
> > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > You could add a screen button to temporarily disable limits.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThe button would send a notification to KFLOP to disable them.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThen a watchdog loop could automatically re-enable them as soon as the limit cleared.ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > Or I suppose that Mach3 scheme could be implemented with a clever User program.
> > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > Regards
> > > > > > > > TK
> > > > > > > >
> > > > > > > >
> > > > > > > > From: himykabibble <jagboy@>
> > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > Sent: Tuesday, November 15, 2011 4:27 PM
> > > > > > > > Subject: [DynoMotion] Re: Recovering From Limit Hit
> > > > > > > >
> > > > > > > >
> > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > Well, that's more than a little disappointing.... I think the way Mach3 handles it is much smarter - when a limit is hit, Mach3 shuts down all axes (actually E-Stops), and remembers what direction each axis WAS moving, then disallows any further programmed moves until the limit is cleared. Jogging, however, IS enabled, PROVIDED the requested jog motion is the direction the that triggered the limit. No over-ride switch needed, and I REALLY don't want to have to add more hardware.
> > > > > > > >
> > > > > > > > This also helps allow a single set of switches to be used for both Home and Limit functions, which is especially nice on smaller machines, where space is limited. My machine has a single input, which serves as Home and Limit for all four axes, and it works perfectly under Mach3 (well, until now....).
> > > > > > > >
> > > > > > > > Regards,
> > > > > > > > Ray L.
> > > > > > > >
> > > > > > > > --- In DynoMotion@yahoogroups.com, william Carrothers <wcarrothers@> wrote:
> > > > > > > > >
> > > > > > > > > I've built an override switch into all my machines for this use.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàI call it the becarefull button.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàSince you have to be carefull to trigger your machine in the right direction when you used it..
> > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > Actually my one control has both an open and close switch for this seeing one machine uses open limit switches and the other it connects has normally closed (the more proper way) switch setup.
> > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > Put in a manual switch is what I would recomend for this..ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàOnly other way would be to disable the drive and move it off manually.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàBut you in theory would loose your possition depending on the type of drives you have.
> > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > That is one thing I'm really starting to like about my AC analog servo drives.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡Ãâàthey always update possition info weather they are enabled or not, moved manually or what.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàThus when I re-enable in mach the actuall possition is updated and I go on.ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâàReally
> COOL!!!ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡Ãâàdon't have to re-home the machine as much.
> > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > b.
> > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > > b.
> > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > >
> > > > > > > > > --- On Tue, 11/15/11, himykabibble <jagboy@> wrote:
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > From: himykabibble <jagboy@>
> > > > > > > > > Subject: [DynoMotion] Recovering From Limit Hit
> > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > Date: Tuesday, November 15, 2011, 7:07 PM
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > ÃÆ'Ã'Ãâ 'ÃÆ'ââ¬Â 'ÃÆ'Ã'ÃââÃÆ'ââââ¬Ã
¡ÃâìÃÆ'ââ¬Â¦ÃâáÃÆ'Ã'Ãâ 'ÃÆ'ââââ¬Å¡Ã¬Ãâ¦Ã¡ÃÆ'Ã'âââ¬Ã
¡ÃÆ'ââ¬Å¡ÃâÃÂ
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > Am I correct in thinking the only way to move the machine off a limit is by having a hardware limit over-ride? When I hit a limit, Mach3 goes into E-Stop, KMotion disables the axis, and there appears to be no way to even get Mach3 out of E-Stop, in order to back off the limit, without first making the limit condition go away. How do I get around this, without additional hardware?
> > > > > > > > >
> > > > > > > > > Regards,
> > > > > > > > > Ray L.
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 2290 |
From: Tom Kerekes |
Date: 11/17/2011 |
Subject: Re: Recovering From Limit Hit |
Hi Ray,
To stop a move just issue a Jog to zero velocity. ie. Jog(0,0);
CheckDone(0) will be true when it actually stops.
Regards
TK
| | | | | | | | | | | | | | | |